[evince/row_collapsed_cb-crash] shell: Don't crash in row_collapsed_cb()
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/row_collapsed_cb-crash] shell: Don't crash in row_collapsed_cb()
- Date: Mon, 25 Mar 2019 13:14:50 +0000 (UTC)
commit 1a798ec9052c48eadef413548044792c82bda510
Author: Marek Kasik <mkasik redhat com>
Date: Mon Mar 25 13:48:14 2019 +0100
shell: Don't crash in row_collapsed_cb()
Check pointer index_expand for NULL before using it.
https://bugzilla.redhat.com/show_bug.cgi?id=1692083
shell/ev-sidebar-links.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c
index 8955d19c..9f757c8a 100644
--- a/shell/ev-sidebar-links.c
+++ b/shell/ev-sidebar-links.c
@@ -518,7 +518,7 @@ row_collapsed_cb (GtkTreeView *tree_view,
if (ev_metadata_get_string (metadata, "index-collapse", &index_collapse)) {
/* If collapsed row is not in 'index_collapse' we add it. */
if (g_strstr_len (index_collapse, -1, path_token) == NULL) {
- if (!strcmp (index_expand, ""))
+ if (index_expand == NULL || index_expand[0] == '\0')
new_index = g_strconcat (index_collapse, path_token, NULL);
else
new_index = g_strconcat (index_collapse, path_token + 1, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]