QWindow: fix crash on Mac

Fixes a crash when QWindow::baseSize() is invalid size.

Change-Id: I4e41f63d69ad0f218bfd35db8f30f18f92d4e9d5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This commit is contained in:
Tasuku Suzuki 2012-03-02 08:53:03 +09:00 committed by Qt by Nokia
parent cf785e0419
commit e3027377f0

View File

@ -201,7 +201,7 @@ void QCocoaWindow::propagateSizeHints()
[m_nsWindow setResizeIncrements : qt_mac_toNSSize(window()->sizeIncrement())]; [m_nsWindow setResizeIncrements : qt_mac_toNSSize(window()->sizeIncrement())];
QSize baseSize = window()->baseSize(); QSize baseSize = window()->baseSize();
if (!baseSize.isNull()) { if (!baseSize.isNull() && baseSize.isValid()) {
[m_nsWindow setFrameSize : NSMakeSize(baseSize.width(), baseSize.height()) display : YES]; [m_nsWindow setFrameSize : NSMakeSize(baseSize.width(), baseSize.height()) display : YES];
} }
} }