diff options
author | Monsta <[email protected]> | 2014-11-29 12:52:08 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-10 10:38:37 +0100 |
commit | e94434691e9f6831072a3353bde9804509e0b624 (patch) | |
tree | 84c92289a75cf722355015b714b2a23ed0c328fd /eel | |
parent | 4ef3498229bfccc76e9354bbd8755fe116063b44 (diff) | |
download | caja-e94434691e9f6831072a3353bde9804509e0b624.tar.bz2 caja-e94434691e9f6831072a3353bde9804509e0b624.tar.xz |
eel: fix logic a bit
Diffstat (limited to 'eel')
-rw-r--r-- | eel/eel-background.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c index dc1dc1f5..9001638d 100644 --- a/eel/eel-background.c +++ b/eel/eel-background.c @@ -936,19 +936,21 @@ eel_bg_set_image_uri_helper (EelBackground *self, const gchar *image_uri, gboolean emit_signal) { - gchar *filename = g_strdup (""); /* GSettings expects a string, not NULL */ + gchar *filename; - if (image_uri != NULL) + if (image_uri != NULL) { filename = g_filename_from_uri (image_uri, NULL, NULL); + } else { + filename = g_strdup (""); /* GSettings expects a string, not NULL */ + } mate_bg_set_filename (self->details->bg, filename); + g_free (filename); if (emit_signal) g_signal_emit (self, signals[SETTINGS_CHANGED], 0, GDK_ACTION_COPY); set_image_properties (self); - - g_free (filename); } /* Use this function to set an image only (no color). |