Fix potential null pointer access

Change-Id: I7516ce88b38609ab9851419566141ba93a59aed3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Frederik Gladhorn 2014-05-14 18:36:26 +02:00 committed by The Qt Project
parent 1d7902a0ca
commit 6ef8eee8d4

View File

@ -827,7 +827,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
// TODO: Release/regrab mouse if a popup has mouse grab. // TODO: Release/regrab mouse if a popup has mouse grab.
return false; return false;
case QtWindows::DestroyEvent: case QtWindows::DestroyEvent:
if (!platformWindow->testFlag(QWindowsWindow::WithinDestroy)) { if (platformWindow && !platformWindow->testFlag(QWindowsWindow::WithinDestroy)) {
qWarning() << "External WM_DESTROY received for " << platformWindow->window() qWarning() << "External WM_DESTROY received for " << platformWindow->window()
<< ", parent: " << platformWindow->window()->parent() << ", parent: " << platformWindow->window()->parent()
<< ", transient parent: " << platformWindow->window()->transientParent(); << ", transient parent: " << platformWindow->window()->transientParent();