Skip to content

Commit d68422d

Browse files
committed
Don't try to connect to null action (removes a warning)
1 parent db23632 commit d68422d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gui/qgsmaptool.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ void QgsMapTool::setAction( QAction* action )
105105
if ( mAction )
106106
disconnect( mAction, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
107107
mAction = action;
108-
connect( mAction, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
108+
if ( mAction )
109+
connect( mAction, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
109110
}
110111

111112
void QgsMapTool::actionDestroyed()

0 commit comments

Comments
 (0)