OSDN Git Service

add conditional to avoid invalid window warning
authorIvailo Monev <xakepa10@laimg.moc>
Sat, 4 May 2019 17:13:53 +0000 (17:13 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sat, 4 May 2019 17:13:53 +0000 (17:13 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/kernel/qwidget_x11.cpp

index 1bdfd88..91325fc 100644 (file)
@@ -1005,7 +1005,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
         } else {
             if (isWindow())
                 qt_x11Data->dndEnable(this, false);
-            if (destroyWindow)
+            if (destroyWindow && data && data->winid)
                 XDestroyWindow(qt_x11Data->display, data->winid);
         }
         QT_TRY {