mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 12:23:06 +02:00
gdesktopappinfo: Add a missing NULL check
It’s possible for the startup ID to be `NULL` if one wasn’t provided in the platform data passed to `launch_uris_with_dbus()`. Passing `NULL` to `g_app_launch_context_launch_failed()` causes a critical warning. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
8fbb8dc442
commit
7cd57b3e85
@ -3157,7 +3157,7 @@ typedef struct
|
||||
GDesktopAppInfo *info; /* (owned) */
|
||||
GAppLaunchContext *launch_context; /* (owned) (nullable) */
|
||||
GAsyncReadyCallback callback;
|
||||
gchar *startup_id; /* (owned) */
|
||||
gchar *startup_id; /* (owned) (nullable) */
|
||||
gpointer user_data;
|
||||
} LaunchUrisWithDBusData;
|
||||
|
||||
@ -3182,7 +3182,10 @@ launch_uris_with_dbus_signal_cb (GObject *object,
|
||||
if (data->launch_context)
|
||||
{
|
||||
if (g_task_had_error (G_TASK (result)))
|
||||
g_app_launch_context_launch_failed (data->launch_context, data->startup_id);
|
||||
{
|
||||
if (data->startup_id != NULL)
|
||||
g_app_launch_context_launch_failed (data->launch_context, data->startup_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
GVariant *platform_data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user