[gnome-desktop] gnome-bg: Add some check to avoid weird crash
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] gnome-bg: Add some check to avoid weird crash
- Date: Mon, 13 Feb 2012 18:16:39 +0000 (UTC)
commit b081283225167b56d4df9aff7631075f9f57747a
Author: Gordon Allott <gord allott canonical com>
Date: Mon Feb 13 19:16:04 2012 +0100
gnome-bg: Add some check to avoid weird crash
https://bugzilla.gnome.org/show_bug.cgi?id=670000
libgnome-desktop/gnome-bg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
index ca7f1d2..0357c71 100644
--- a/libgnome-desktop/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg.c
@@ -305,7 +305,7 @@ gnome_bg_load_from_preferences (GnomeBG *bg,
/* Filename */
filename = NULL;
tmp = g_settings_get_string (settings, BG_KEY_PICTURE_URI);
- if (*tmp != '\0') {
+ if (tmp && *tmp != '\0') {
filename = g_filename_from_uri (tmp, NULL, NULL);
if (filename != NULL && g_file_test (filename, G_FILE_TEST_EXISTS) == FALSE) {
g_free (filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]