From 02ae8c3193aa6bdd459fdf5382a48f38d83ae33e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 19 Feb 2015 22:22:46 +0100 Subject: [PATCH] extras: Fix a crash when reloading the page Make gs_shell_extras_reload() a noop when we have no contents for the page. Thanks to Rafal Luzynski for spotting this! --- src/gs-shell-extras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gs-shell-extras.c b/src/gs-shell-extras.c index cdd8211..474bf27 100644 --- a/src/gs-shell-extras.c +++ b/src/gs-shell-extras.c @@ -721,7 +721,8 @@ gs_shell_extras_load (GsShellExtras *shell_extras, GPtrArray *array_search_data) void gs_shell_extras_reload (GsShellExtras *shell_extras) { - gs_shell_extras_load (shell_extras, NULL); + if (priv->array_search_data != NULL) + gs_shell_extras_load (shell_extras, NULL); } static void -- 2.3.0 From fae08193f7e4eb1f9930bdca2d856683660e8c74 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 19 Feb 2015 22:32:57 +0100 Subject: [PATCH] Fix the build --- src/gs-shell-extras.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gs-shell-extras.c b/src/gs-shell-extras.c index 474bf27..349a788 100644 --- a/src/gs-shell-extras.c +++ b/src/gs-shell-extras.c @@ -721,6 +721,8 @@ gs_shell_extras_load (GsShellExtras *shell_extras, GPtrArray *array_search_data) void gs_shell_extras_reload (GsShellExtras *shell_extras) { + GsShellExtrasPrivate *priv = shell_extras->priv; + if (priv->array_search_data != NULL) gs_shell_extras_load (shell_extras, NULL); } -- 2.3.0