[gnome-software] extras: Fix a crash when reloading the page



commit 02ae8c3193aa6bdd459fdf5382a48f38d83ae33e
Author: Kalev Lember <kalevlember gmail com>
Date:   Thu Feb 19 22:22:46 2015 +0100

    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 files changed, 2 insertions(+), 1 deletions(-)
---
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


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