[gnome-shell/gnome-3-10] shell-app: Don't crash when trying to dispose
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-10] shell-app: Don't crash when trying to dispose
- Date: Thu, 6 Feb 2014 16:42:13 +0000 (UTC)
commit a5370ce3bd9092d0909e1f00dc9f1b53ebe40e37
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Jan 28 16:47:23 2014 -0500
shell-app: Don't crash when trying to dispose
If we dispose a ShellApp that has windows left, then we'll crash
when we remove the last window, as that frees and NULLs out
app->running_state.
https://bugzilla.gnome.org/show_bug.cgi?id=723197
src/shell-app.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 99f51ed..f5b647c 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1590,11 +1590,9 @@ shell_app_dispose (GObject *object)
app->entry = NULL;
}
- if (app->running_state)
- {
- while (app->running_state->windows)
- _shell_app_remove_window (app, app->running_state->windows->data);
- }
+ while (app->running_state)
+ _shell_app_remove_window (app, app->running_state->windows->data);
+
/* We should have been transitioned when we removed all of our windows */
g_assert (app->state == SHELL_APP_STATE_STOPPED);
g_assert (app->running_state == NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]