fixed segmantation fault
[livewp] / applet / src / livewp-main.c
index 606de53..b16b15f 100644 (file)
@@ -74,10 +74,8 @@ void
 view_changed (GConfClient *client, guint cnxn_id,
                  GConfEntry *entry, Animation_WallpaperPrivate *priv)
 {
-    GConfValue *value;
-    value = gconf_entry_get_value (entry);
-    if (value) {
-       if (priv->view == gconf_value_get_int (value))
+   if (entry->value->type == GCONF_VALUE_INT) {
+       if (priv->view == gconf_value_get_int(entry->value))
            priv->visible = TRUE;
        else
            priv->visible = FALSE;
@@ -92,7 +90,6 @@ view_changed (GConfClient *client, guint cnxn_id,
                 priv->long_timer = 0;
             }
        }
-    gconf_value_free(value);
     }
 }
 /*******************************************************************************/