[gnome-software] Fix a crash when double clicking package files
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix a crash when double clicking package files
- Date: Wed, 16 Mar 2016 09:58:53 +0000 (UTC)
commit f6a9179f5b24d5bf59c478a925c6de95ab108611
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 740f490..2ec2bd9 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -173,6 +173,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]