diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2007-08-22 14:38:33 +0100 |
---|---|---|
committer | Rob Taylor <rob.taylor@codethink.co.uk> | 2007-08-22 15:17:50 +0100 |
commit | 06e0d187cf16ad9f093b2d5136dca50e2fe8f3c3 (patch) | |
tree | e9acb8ec5f271f77dda8f6db8029076aea178c25 | |
parent | fb7a82c5a7425d14e248a44d5a7fc15e987a8943 (diff) |
fix dpms plugin to not crash at end if failed to connect to xserver
Fix dpms plugin to not crash at end if failed to connect to xserver.
-rw-r--r-- | plugins/glue/dpms/ohm-plugin-dpms.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/glue/dpms/ohm-plugin-dpms.c b/plugins/glue/dpms/ohm-plugin-dpms.c index 603b5d7..9826918 100644 --- a/plugins/glue/dpms/ohm-plugin-dpms.c +++ b/plugins/glue/dpms/ohm-plugin-dpms.c @@ -175,8 +175,10 @@ plugin_initalize (OhmPlugin *plugin) static void plugin_destroy (OhmPlugin *plugin) { - XCloseDisplay (dpy); - dpy = NULL; + if (dpy) { + XCloseDisplay (dpy); + dpy = NULL; + } } /** |