[bijiben] on_item_activated: check there is a path before going to far
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] on_item_activated: check there is a path before going to far
- Date: Sun, 6 Oct 2013 22:21:36 +0000 (UTC)
commit 37b4112880f81b8f49ac82c0cd5a59b4d97cdff7
Author: Pierre-Yves Luyten <py luyten fr>
Date: Fri Oct 4 00:38:18 2013 +0200
on_item_activated: check there is a path before going to far
If we have no path and look into ghashtable, g_str_hash will sigsev.
See 709197. The item has a path when added, but loses it for some reason.
src/bjb-main-view.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/bjb-main-view.c b/src/bjb-main-view.c
index 514e026..225fb8d 100644
--- a/src/bjb-main-view.c
+++ b/src/bjb-main-view.c
@@ -344,6 +344,8 @@ on_item_activated (GdMainView * gd,
gtk_tree_model_get_iter (model, &iter, (GtkTreePath*) path);
gtk_tree_model_get (model, &iter, GD_MAIN_COLUMN_URI, &item_path,-1);
+ g_return_if_fail (item_path != NULL); // #709197
+
/* Switch to that item */
book = bjb_window_base_get_book (view->priv->window);
to_open = biji_note_book_get_item_at_path (book, item_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]