diff options
author | Simon Rettberg | 2016-10-27 15:22:40 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-10-27 15:22:40 +0200 |
commit | f10409fb21d8d6d6773b0bd7118d2170559187b6 (patch) | |
tree | 5fc1a05820051c4fb75987c2240f74669187407e /src/client/util/platform | |
parent | [client] Move ServerConnection instance to ClientApp (diff) | |
download | pvs2-f10409fb21d8d6d6773b0bd7118d2170559187b6.tar.gz pvs2-f10409fb21d8d6d6773b0bd7118d2170559187b6.tar.xz pvs2-f10409fb21d8d6d6773b0bd7118d2170559187b6.zip |
[client] Fix memleak
Diffstat (limited to 'src/client/util/platform')
-rw-r--r-- | src/client/util/platform/blankscreen_X11.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/util/platform/blankscreen_X11.cpp b/src/client/util/platform/blankscreen_X11.cpp index 66c9f1f..1f36f89 100644 --- a/src/client/util/platform/blankscreen_X11.cpp +++ b/src/client/util/platform/blankscreen_X11.cpp @@ -21,7 +21,6 @@ BlankScreen::BlankScreen() : QDialog(NULL) _sysdep->dpy = XOpenDisplay(NULL); if (_sysdep->dpy == NULL) return; - assert(_sysdep->dpy); setWindowFlags(Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint); setStyleSheet("background-color:#000"); @@ -32,6 +31,9 @@ BlankScreen::BlankScreen() : QDialog(NULL) BlankScreen::~BlankScreen() { unlock(); + if (_sysdep->dpy != NULL) { + XCloseDisplay(_sysdep->dpy); + } delete _sysdep; } |