OSDN Git Service

GAppInfo: overwrite the DISPLAY only if it is set in the launch context
authorDebarshi Ray <debarshir@gnome.org>
Mon, 16 Apr 2012 21:00:01 +0000 (23:00 +0200)
committerDebarshi Ray <debarshir@gnome.org>
Thu, 26 Apr 2012 21:12:53 +0000 (23:12 +0200)
commit9926b9315c3f74a9b0b54fb29cd6495dd363fd54
tree32407cf0fdc048d6b715e16c6c1b122208a9808f
parenta7a1a50d6a8eb8387cce1756f3c38abf36f281b4
GAppInfo: overwrite the DISPLAY only if it is set in the launch context

If the launch context is a GAppLaunchContext, and not a
GdkAppLaunchContext, then g_app_launch_context_get_display will return
NULL because the get_display virtual method is undefined. The DISPLAY
might still be inherited from the parent process, in which case
overwriting it with NULL breaks the launch.

This is a regression introduced in:
de834bed306565c0652050665eafff4dfcdf0d8b

Fixes: https://bugzilla.gnome.org/672786
gio/gdesktopappinfo.c