summaryrefslogtreecommitdiff
path: root/plugins/scale/src/scale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/scale/src/scale.cpp')
-rw-r--r--plugins/scale/src/scale.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp
index 44adaf7..8fbcbb3 100644
--- a/plugins/scale/src/scale.cpp
+++ b/plugins/scale/src/scale.cpp
@@ -1418,7 +1418,7 @@ PrivateScaleScreen::hoverTimeout ()
void
PrivateScaleScreen::handleEvent (XEvent *event)
{
- CompWindow *w;
+ CompWindow *w = NULL;
switch (event->type) {
case KeyPress:
@@ -1577,10 +1577,12 @@ PrivateScaleScreen::handleEvent (XEvent *event)
switch (event->type) {
case UnmapNotify:
- windowRemove (w);
+ if (w)
+ windowRemove (w);
break;
case DestroyNotify:
- windowRemove (w);
+ if (w)
+ windowRemove (w);
break;
}
}