summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-06-30 14:10:59 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-06-30 14:17:03 (GMT)
commit84756e043fa2bd9c83b24abffb280290ad3667cd (patch)
tree90e41d6fa56d780ab23d931f1db2c16cb82ecf10 /src/gui/kernel
parent08e2c776bf2ce6976276bcdcce342ae8c4675565 (diff)
downloadQt-84756e043fa2bd9c83b24abffb280290ad3667cd.zip
Qt-84756e043fa2bd9c83b24abffb280290ad3667cd.tar.gz
Qt-84756e043fa2bd9c83b24abffb280290ad3667cd.tar.bz2
Crash while changing the windows flags from a Qt::Drawer window on Cocoa
The crash was caused while checking the visibility of the toolbar inside a native cocoa window. There is no toolbar for a drawer window. Task-number: QTBUG-11138 Reviewed-by: Denis
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_mac.mm8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index a9bb691..e57ec77 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2861,9 +2861,11 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
}
if (wasWindow) {
oldToolbar = [oldWindow toolbar];
- [oldToolbar retain];
- oldToolbarVisible = [oldToolbar isVisible];
- [oldWindow setToolbar:nil];
+ if (oldToolbar) {
+ [oldToolbar retain];
+ oldToolbarVisible = [oldToolbar isVisible];
+ [oldWindow setToolbar:nil];
+ }
}
#endif
}