From 0fcba4ed11c48b0db48fa420312e93503b0d7cae Mon Sep 17 00:00:00 2001 From: nirvn Date: Tue, 17 Sep 2019 11:50:23 +0700 Subject: [PATCH] Be on the safe side, check for null message bar pointer --- src/app/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index 1dac6d8f65e..8a5465e3c8c 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -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 ); }