[gnome-software] Fix a crash when clicking the back button
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix a crash when clicking the back button
- Date: Mon, 5 Jan 2015 21:19:51 +0000 (UTC)
commit facb84ebc865cb81a8711253f806f5c87c5421f7
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Jan 5 21:14:15 2015 +0100
Fix a crash when clicking the back button
Avoid crashing in the clicked handler in case we have an underflow in
back_entry_stack. It's unclear how this can happen, but log a critical
warning for now and ignore the underflow.
https://bugzilla.redhat.com/show_bug.cgi?id=1145782
src/gs-shell.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index dc9a543..e5647e0 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -268,6 +268,8 @@ gs_shell_back_button_cb (GtkWidget *widget, GsShell *shell)
GsShellPrivate *priv = shell->priv;
BackEntry *entry;
+ g_return_if_fail (!g_queue_is_empty (priv->back_entry_stack));
+
entry = g_queue_pop_head (priv->back_entry_stack);
gs_shell_change_mode (shell, entry->mode, entry->app, entry->category, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]