Salome HOME
Merge branch 'BR_EDF_2018_Lot1'
[modules/shaper.git] / src / XGUI / XGUI_WorkshopListener.cpp
index fd5c11630267e7a01f080d7075db5377249bec53..4b3546211d2f1b4d540f3f01eb507b029daa91c2 100755 (executable)
@@ -119,7 +119,8 @@ void XGUI_WorkshopListener::initializeEventListening()
 //******************************************************
 void XGUI_WorkshopListener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
-  if (QApplication::instance()->thread() != QThread::currentThread()) {
+  if (QApplication::instance() &&
+      QApplication::instance()->thread() != QThread::currentThread()) {
     #ifdef _DEBUG
     std::cout << "XGUI_Workshop::processEvent: " << "Working in another thread." << std::endl;
     #endif