Skip to content

Commit

Permalink
Check if previous map tool is nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros authored and nyalldawson committed Jul 13, 2020
1 parent 622e9a8 commit a6c6fa8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/georeferencer/qgsgeorefmainwindow.cpp
Expand Up @@ -401,13 +401,15 @@ void QgsGeoreferencerMainWindow::generateGDALScript()
void QgsGeoreferencerMainWindow::setAddPointTool()
{
mCanvas->setMapTool( mToolAddPoint );
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
if ( mPrevQgisMapTool )
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
}

void QgsGeoreferencerMainWindow::setDeletePointTool()
{
mCanvas->setMapTool( mToolDeletePoint );
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
if ( mPrevQgisMapTool )
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
}

void QgsGeoreferencerMainWindow::setMovePointTool()
Expand Down

0 comments on commit a6c6fa8

Please sign in to comment.