summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-sidebar.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-05-29 18:39:00 +0200
committerraveit65 <[email protected]>2016-05-30 17:32:47 +0200
commitf9b45e265b9371b5a857c3aafa5d68d8394ad0be (patch)
tree1804dc6cda72f5aa8f68bfa4dda101db664f8d13 /mate-dictionary/src/gdict-sidebar.c
parent3f63b98946169bf9f7b4013376113af5bc107605 (diff)
downloadmate-utils-f9b45e265b9371b5a857c3aafa5d68d8394ad0be.tar.bz2
mate-utils-f9b45e265b9371b5a857c3aafa5d68d8394ad0be.tar.xz
mdict: Remove assertion in sidebar code
Allow the sidebar page to be unset. taken from: https://git.gnome.org/browse/gnome-dictionary/commit/?id=cff1cc6
Diffstat (limited to 'mate-dictionary/src/gdict-sidebar.c')
-rw-r--r--mate-dictionary/src/gdict-sidebar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mate-dictionary/src/gdict-sidebar.c b/mate-dictionary/src/gdict-sidebar.c
index 75e1d252..7ca99fab 100644
--- a/mate-dictionary/src/gdict-sidebar.c
+++ b/mate-dictionary/src/gdict-sidebar.c
@@ -562,7 +562,8 @@ gdict_sidebar_current_page (GdictSidebar *sidebar)
index = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook));
page = g_slist_nth_data (priv->pages, index);
- g_assert (page != NULL);
+ if (page == NULL)
+ return NULL;
return page->id;
}