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
This commit is contained in:
parent
1a33cd9584
commit
a1bb0ec738
@ -299,7 +299,7 @@ get_app_for_window (ShellWindowTracker *tracker,
|
|||||||
result = shell_app_system_lookup_wmclass (app_system,
|
result = shell_app_system_lookup_wmclass (app_system,
|
||||||
meta_window_get_wm_class (window));
|
meta_window_get_wm_class (window));
|
||||||
if (result != NULL)
|
if (result != NULL)
|
||||||
return result;
|
return g_object_ref (result);
|
||||||
|
|
||||||
result = get_app_from_window_pid (tracker, window);
|
result = get_app_from_window_pid (tracker, window);
|
||||||
if (result != NULL)
|
if (result != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user