Skip to content

Commit d77069d

Browse files
committedMay 23, 2012
check thread in customization, it should fix #5597
1 parent 7200ea2 commit d77069d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/app/qgscustomization.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,11 @@ void QgsCustomization::removeFromLayout( QLayout *theLayout, QWidget * theWidget
856856

857857
void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * done )
858858
{
859+
// Crashes especially on Mac if the reciever is in another thread, see #5597
860+
if ( QCoreApplication::instance()->thread() != receiver->thread() )
861+
{
862+
return;
863+
}
859864
if ( event->type() == QEvent::Show || event->type() == QEvent::MouseButtonPress )
860865
{
861866
QWidget *widget = qobject_cast<QWidget*>( receiver );

0 commit comments

Comments
 (0)
Please sign in to comment.