gdesktopappinfo: Don't crash if we don't have a desktop filename
authorColin Walters <walters@verbum.org>
Thu, 6 Jan 2011 16:47:58 +0000 (11:47 -0500)
committerColin Walters <walters@verbum.org>
Thu, 6 Jan 2011 18:32:56 +0000 (13:32 -0500)
commite738a8dd8ca3d3dd327bc5a3bbfd151858738609
treee72aee4f067d7a189c8eae3175954cc3a64ce848
parent26b65a3abda5ad0930b1cd0d0652417feb50c274
gdesktopappinfo: Don't crash if we don't have a desktop filename

If code creates a GDesktopAppInfo via g_desktop_app_info_new_from_keyfile(),
we'd try to send a NULL pointer down into GVariant.

Since in this case we don't have a filename, just send the empty
string.  In the future we should either:

1) Change panel to use g_desktop_app_info_new_from_filename(), and
   take the hit of parsing the file twice.
2) Add a g_key_file_get_origin_filename()
3) Add g_desktop_app_info_new_from_keyfile_and_name()

https://bugzilla.gnome.org/show_bug.cgi?id=638838
gio/gdesktopappinfo.c