diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2007-08-04 12:01:30 +0100 |
---|---|---|
committer | Rob Taylor <rob.taylor@codethink.co.uk> | 2007-08-04 12:01:30 +0100 |
commit | a9b055d958d3c5b0fb8e9d4780dae672e65972d5 (patch) | |
tree | 166071f1377a22631709274748ba05f981474704 /plugins/glue | |
parent | 7a6aeb73860ab47a724cc56d2da0722dbf500278 (diff) |
Fix crasher on destroy in plugin-idle
Idle plugin was crashing on destroy if xorg.has_xauthority was 0 for the duration of its running.
Diffstat (limited to 'plugins/glue')
-rw-r--r-- | plugins/glue/idle/ohm-plugin-idle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/glue/idle/ohm-plugin-idle.c b/plugins/glue/idle/ohm-plugin-idle.c index 31de93c..2990f58 100644 --- a/plugins/glue/idle/ohm-plugin-idle.c +++ b/plugins/glue/idle/ohm-plugin-idle.c @@ -25,7 +25,7 @@ #include <libidletime.h> #include <stdlib.h> -static LibIdletime *idletime; +static LibIdletime *idletime = NULL; enum { CONF_XORG_HASXAUTH_CHANGED, @@ -128,7 +128,8 @@ plugin_notify (OhmPlugin *plugin, gint id, gint value) static void plugin_destroy (OhmPlugin *plugin) { - g_object_unref (idletime); + if (idletime) + g_object_unref (idletime); } OHM_PLUGIN_DESCRIPTION ( |