[gnome-software/gnome-3-20] Fix a crash when double clicking package files



commit 4992c8a7163b960f16386740c14d4dbb3735337f
Author: Richard Hughes <richard hughsie com>
Date:   Wed Mar 16 09:46:28 2016 +0000

    Fix a crash when double clicking package files
    
    This is caused by a call to gs_shell_details_switch_to() before the
    filename_to_app() plugin function has run. We call gs_shell_details_switch_to()
    manually after completing this task so ignoring the first refresh is the right
    thing to do.
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=763733

 src/gs-shell-details.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 182c515..d09e8d5 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -172,6 +172,10 @@ gs_shell_details_switch_to (GsPage *page, gboolean scroll_up)
        widget = GTK_WIDGET (gtk_builder_get_object (self->builder, "application_details_header"));
        gtk_widget_show (widget);
 
+       /* not set, perhaps filename-to-app */
+       if (self->app == NULL)
+               return;
+
        state = gs_app_get_state (self->app);
 
        /* label */


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