summaryrefslogtreecommitdiff
path: root/plugins/scale/src/scale.cpp
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-12-13 21:41:34 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-12-13 21:41:34 +0800
commit25edfca526e6f3eb2fae85372d139810ca869e78 (patch)
treeef447803fb8c470145f2b85a1bee571bbd647f07 /plugins/scale/src/scale.cpp
parent1647f9f9f74b2e396a2b32ccdac81b955bc84aa6 (diff)
downloadcompiz-with-glib-mainloop-25edfca526e6f3eb2fae85372d139810ca869e78.tar.gz
compiz-with-glib-mainloop-25edfca526e6f3eb2fae85372d139810ca869e78.tar.bz2
Fix unintialized variable usage
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;
}
}