[devhelp] search: when deleting a book, consider that it may not be in the combobox



commit a5ddcc583a6c42f294b4ac9ee82dd11c5ec5f6fb
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Mon Dec 20 16:05:18 2010 +0100

    search: when deleting a book, consider that it may not be in the combobox

 src/dh-search.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/dh-search.c b/src/dh-search.c
index fce8352..d8537e7 100644
--- a/src/dh-search.c
+++ b/src/dh-search.c
@@ -931,9 +931,10 @@ search_combo_delete_book (DhSearch *search,
                                 NULL,
                                 NULL);
 
-        g_assert (found);
-
-        gtk_list_store_remove (store, &iter);
+        /* Book may not be found in the combobox if it wasn't enabled */
+        if (found) {
+                gtk_list_store_remove (store, &iter);
+        }
 }
 
 static void



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