mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
check thread in customization, it should fix #5597
This commit is contained in:
parent
7200ea23f1
commit
d77069d2b0
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user