mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-12 20:24:04 +02:00
GApplication: create local commandline properly
Don't pass a gchar** to g_object_new() when a GVariant* is expected.
This commit is contained in:
@@ -1053,9 +1053,11 @@ g_application_run (GApplication *application,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GApplicationCommandLine *cmdline;
|
GApplicationCommandLine *cmdline;
|
||||||
|
GVariant *v;
|
||||||
|
|
||||||
|
v = g_variant_new_bytestring_array ((const gchar **) arguments, -1);
|
||||||
cmdline = g_object_new (G_TYPE_APPLICATION_COMMAND_LINE,
|
cmdline = g_object_new (G_TYPE_APPLICATION_COMMAND_LINE,
|
||||||
"arguments", arguments, NULL);
|
"arguments", v, NULL);
|
||||||
g_signal_emit (application,
|
g_signal_emit (application,
|
||||||
g_application_signals[SIGNAL_COMMAND_LINE],
|
g_application_signals[SIGNAL_COMMAND_LINE],
|
||||||
0, cmdline, &status);
|
0, cmdline, &status);
|
||||||
|
Reference in New Issue
Block a user