[rhythmbox] rhythmdb: don't dereference a potentially invalid entry type (bug #622753)



commit 8d1be192ed07e93ca25f02623d2eee573684b0e7
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Jun 26 10:24:42 2010 +1000

    rhythmdb: don't dereference a potentially invalid entry type (bug #622753)

 rhythmdb/rhythmdb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index f2043bf..c974499 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -2287,14 +2287,14 @@ rhythmdb_add_import_error_entry (RhythmDB *db,
 	RhythmDBEntry *entry;
 	GValue value = {0,};
 
-	rb_debug ("adding import error type %s for %s: %s",
-		  error_entry_type->name,
-		  rb_refstring_get (event->real_uri),
-		  event->error ? event->error->message : "<no error>");
 	if (error_entry_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		/* we don't have an error entry type, so we can't add an import error */
 		return;
 	}
+	rb_debug ("adding import error type %s for %s: %s",
+		  error_entry_type->name,
+		  rb_refstring_get (event->real_uri),
+		  event->error ? event->error->message : "<no error>");
 
 	entry = rhythmdb_entry_lookup_by_location_refstring (db, event->real_uri);
 	if (entry) {



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