Skip to content

Commit

Permalink
Be on the safe side, check for null message bar pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Sep 17, 2019
1 parent 74c4f8e commit 0fcba4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/main.cpp
Expand Up @@ -407,7 +407,7 @@ void myMessageOutput( QtMsgType type, const char *msg )
dumpBacktrace( 20 );

// also be super obnoxious -- we DON'T want to allow these errors to be ignored!!
if ( QgisApp::instance() && QgisApp::instance()->thread() == QThread::currentThread() )
if ( QgisApp::instance() && QgisApp::instance()->messageBar() && QgisApp::instance()->thread() == QThread::currentThread() )
{
QgisApp::instance()->messageBar()->pushCritical( QStringLiteral( "Qt" ), msg );
}
Expand Down

0 comments on commit 0fcba4e

Please sign in to comment.