Skip to content

Commit

Permalink
another take on #5597
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 23, 2012
1 parent f998a44 commit b600ff7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/qgscustomization.cpp
Expand Up @@ -35,6 +35,7 @@
#include <QToolButton>
#include <QStatusBar>
#include <QMetaObject>
#include <QThread>

#ifdef Q_OS_MACX
QgsCustomizationDialog::QgsCustomizationDialog( QWidget *parent )
Expand Down Expand Up @@ -856,8 +857,8 @@ void QgsCustomization::removeFromLayout( QLayout *theLayout, QWidget * theWidget

void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * done )
{
// Crashes especially on Mac if the reciever is in another thread, see #5597
if ( QCoreApplication::instance()->thread() != receiver->thread() )
// Crashes especially on Mac if we're not in the main/UI thread, see #5597
if ( QCoreApplication::instance()->thread() != QThread::currentThread() )
{
return;
}
Expand Down

0 comments on commit b600ff7

Please sign in to comment.