[evolution/wip/webkit2] Fix a crash on Evolution quit in gtk_application_impl_uninhibit()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Fix a crash on Evolution quit in gtk_application_impl_uninhibit()
- Date: Wed, 2 Mar 2016 18:14:20 +0000 (UTC)
commit 84591244bda3a25acda8f54d9ab4614b39ac3d96
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 24 16:07:52 2015 +0100
Fix a crash on Evolution quit in gtk_application_impl_uninhibit()
The shell_ready_for_quit() could be called twice, the first time for user-initiated
quit, the second time when the GApplication "shutdown" signal had been invoked. This
invocation had been added recently, to fix memory leaks. While it didn't matter
for desktop environments where the GtkApplication's inhibit/uninhibit didn't work,
it did matter for the GNOME Shell. The second call to shell_ready_for_quit() had been
called inside EShell's finalize, which didn't find the right GtkApplication class (a
NULL had been passed to the function), which caused the crash. The fix is to not call
shell_prepare_for_quit() from within the "shutdown" signal callback when the quit
had been already acknowledged.
shell/e-shell.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 11eb658..df0011d 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -1228,7 +1228,8 @@ static void
shell_sm_quit_cb (EShell *shell,
gpointer user_data)
{
- shell_prepare_for_quit (shell);
+ if (!shell->priv->ready_to_quit)
+ shell_prepare_for_quit (shell);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]