From a1bb0ec7389332a8a070c2edd18409a0773245c3 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 27 Jun 2012 19:14:27 +0200 Subject: [PATCH] WindowTracker: fix ref counting bug in get_app_for_window() get_app_for_window() is (transfer full), but shell_app_system_lookup_wmclass() is (transfer none), so we must reference the result, or crash occur. https://bugzilla.gnome.org/show_bug.cgi?id=678992 --- src/shell-window-tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index b97f5422a..d2cc7a82c 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -299,7 +299,7 @@ get_app_for_window (ShellWindowTracker *tracker, result = shell_app_system_lookup_wmclass (app_system, meta_window_get_wm_class (window)); if (result != NULL) - return result; + return g_object_ref (result); result = get_app_from_window_pid (tracker, window); if (result != NULL)