[rhythmbox] library: don't crash if gconf_client_get_entry returns NULL (bug 597708)



commit 2d0e5113aaecce2b293786b5081a04a67f1e9691
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Oct 10 11:33:19 2009 +1000

    library: don't crash if gconf_client_get_entry returns NULL (bug 597708)

 sources/rb-library-source.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/sources/rb-library-source.c b/sources/rb-library-source.c
index 4a00a9f..3307ea3 100644
--- a/sources/rb-library-source.c
+++ b/sources/rb-library-source.c
@@ -1026,6 +1026,7 @@ rb_library_source_layout_path_changed (GConfClient *client,
 	char *value;
 	int i = 0;
 
+	g_return_if_fail (entry != NULL);
 	g_return_if_fail (strcmp (entry->key, CONF_LIBRARY_LAYOUT_PATH) == 0);
 
 	rb_debug ("layout path changed");
@@ -1057,6 +1058,7 @@ rb_library_source_layout_filename_changed (GConfClient *client,
 	char *value;
 	int i = 0;
 
+	g_return_if_fail (entry != NULL);
 	g_return_if_fail (strcmp (entry->key, CONF_LIBRARY_LAYOUT_FILENAME) == 0);
 
 	rb_debug ("layout filename changed");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]