]> spindle.queued.net Git - midori/commitdiff
Fix invalid bookmark warning and move into insertion
authorChristian Dywan <christian@twotoasts.de>
Wed, 19 Jan 2011 20:34:39 +0000 (21:34 +0100)
committerChristian Dywan <christian@twotoasts.de>
Wed, 19 Jan 2011 20:34:39 +0000 (21:34 +0100)
midori/main.c
panels/midori-bookmarks.c

index cd0b2ef047936f40e733dc224075bb045abe827d..31276b01bdb941ee7f23e73b95b0b59d7a94f857 100644 (file)
@@ -494,9 +494,6 @@ midori_bookmarks_add_item_cb (KatzeArray* array,
                               KatzeItem*  item,
                               sqlite3*    db)
 {
-    g_return_if_fail (!katze_item_get_name (item)
-                   && !katze_item_get_uri (item));
-
     midori_bookmarks_insert_item_db (db, item,
         katze_item_get_meta_string (item, "folder"));
 }
index f059a7cd6573473b162bef7cbe8af4f909896b57..3e0924f060a0c679b0fc87ccdf4b63373ec813c7 100644 (file)
@@ -242,6 +242,9 @@ midori_bookmarks_insert_item_db (sqlite3*     db,
     gchar* parent;
     gchar* uri;
 
+    g_return_if_fail (katze_item_get_name (item)
+                   && katze_item_get_uri (item));
+
     if (KATZE_ITEM_IS_BOOKMARK (item))
         uri = g_strdup (katze_item_get_uri (item));
     else