diff options
Diffstat (limited to 'src/gui/kernel/qplatformscreen.cpp')
-rw-r--r-- | src/gui/kernel/qplatformscreen.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp index 71710d1cb1..fa6d785b04 100644 --- a/src/gui/kernel/qplatformscreen.cpp +++ b/src/gui/kernel/qplatformscreen.cpp @@ -52,9 +52,11 @@ QPlatformScreen::QPlatformScreen() QPlatformScreen::~QPlatformScreen() { Q_D(QPlatformScreen); - - QGuiApplicationPrivate::screen_list.removeOne(d->screen); - delete d->screen; + if (d->screen) { + qWarning("Manually deleting a QPlatformScreen. Call QPlatformIntegration::destroyScreen instead."); + QGuiApplicationPrivate::screen_list.removeOne(d->screen); + delete d->screen; + } } /*! |