Skip to content

Commit

Permalink
check thread in customization, it should fix #5597
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed May 23, 2012
1 parent 7200ea2 commit d77069d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgscustomization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,11 @@ 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() )
{
return;
}
if ( event->type() == QEvent::Show || event->type() == QEvent::MouseButtonPress )
{
QWidget *widget = qobject_cast<QWidget*>( receiver );
Expand Down

0 comments on commit d77069d

Please sign in to comment.