summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-02-06 22:24:42 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-02-06 22:24:42 +0800
commit9bea12c43bf15420a334c541b217f9ea5b64a4d1 (patch)
tree2fa6664322c3d60b57f20b21674478c264e9c216 /src
parent6829746b2bcb810b6a0cd18856c5646e6b054fbb (diff)
downloadzcomp-9bea12c43bf15420a334c541b217f9ea5b64a4d1.tar.gz
zcomp-9bea12c43bf15420a334c541b217f9ea5b64a4d1.tar.bz2
Fix invalid read
Diffstat (limited to 'src')
-rw-r--r--src/screen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screen.cpp b/src/screen.cpp
index 8acfcf5..cf528bf 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -4216,6 +4216,7 @@ CompScreen::init (const char *name)
priv->escapeKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Escape"));
priv->returnKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Return"));
+ priv->screenNum = DefaultScreen (dpy);
sprintf (buf, "WM_S%d", DefaultScreen (dpy));
wmSnAtom = XInternAtom (dpy, buf, 0);
@@ -4318,7 +4319,6 @@ CompScreen::init (const char *name)
priv->screenEdge[i].count = 0;
}
- priv->screenNum = DefaultScreen (dpy);
priv->colormap = DefaultColormap (dpy, priv->screenNum);
priv->root = XRootWindow (dpy, priv->screenNum);