Fix invalid bookmark warning and move into insertion

This commit is contained in:
Christian Dywan 2011-01-19 21:34:39 +01:00
parent 2f2e368b8a
commit f0d2c49355
2 changed files with 3 additions and 3 deletions

View file

@ -494,9 +494,6 @@ midori_bookmarks_add_item_cb (KatzeArray* array,
KatzeItem* item, KatzeItem* item,
sqlite3* db) sqlite3* db)
{ {
g_return_if_fail (!katze_item_get_name (item)
&& !katze_item_get_uri (item));
midori_bookmarks_insert_item_db (db, item, midori_bookmarks_insert_item_db (db, item,
katze_item_get_meta_string (item, "folder")); katze_item_get_meta_string (item, "folder"));
} }

View file

@ -242,6 +242,9 @@ midori_bookmarks_insert_item_db (sqlite3* db,
gchar* parent; gchar* parent;
gchar* uri; gchar* uri;
g_return_if_fail (katze_item_get_name (item)
&& katze_item_get_uri (item));
if (KATZE_ITEM_IS_BOOKMARK (item)) if (KATZE_ITEM_IS_BOOKMARK (item))
uri = g_strdup (katze_item_get_uri (item)); uri = g_strdup (katze_item_get_uri (item));
else else