[gnome-shell] Bug 591626 - Fix crash in ShellAppMonitor
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Bug 591626 - Fix crash in ShellAppMonitor
- Date: Thu, 13 Aug 2009 00:08:29 +0000 (UTC)
commit 51723bb93b88ad07efbed5f1cd04172533810cf1
Author: Colin Walters <walters verbum org>
Date: Wed Aug 12 19:45:17 2009 -0400
Bug 591626 - Fix crash in ShellAppMonitor
Pass application into signal as expected. Be sure to reference
it across the call, since removal from the hash unrefs it.
src/shell-app-monitor.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-app-monitor.c b/src/shell-app-monitor.c
index ebeba0e..08ce67e 100644
--- a/src/shell-app-monitor.c
+++ b/src/shell-app-monitor.c
@@ -595,6 +595,8 @@ shell_app_monitor_on_window_removed (MetaWorkspace *workspace,
if (!app)
return;
+ shell_app_info_ref (app);
+
usage = get_app_usage_from_window (self, window);
if (window == self->watched_window)
@@ -609,8 +611,10 @@ shell_app_monitor_on_window_removed (MetaWorkspace *workspace,
if (usage->window_count == 0)
{
usage->initially_seen_sequence = 0;
- g_signal_emit (self, signals[APP_REMOVED], 0);
+ g_signal_emit (self, signals[APP_REMOVED], 0, app);
}
+
+ shell_app_info_unref (app);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]