projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9171894
)
Make basic-application test more robust
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 4 Apr 2012 10:38:36 +0000
(06:38 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 4 Apr 2012 19:02:48 +0000
(15:02 -0400)
This program is only used indirectly from gapplication.c in
tests, but that is no reason to let it segfault when it is
run from the commandline without arguments.
gio/tests/basic-application.c
patch
|
blob
|
history
diff --git
a/gio/tests/basic-application.c
b/gio/tests/basic-application.c
index
ea7ee60
..
c5f7b99
100644
(file)
--- a/
gio/tests/basic-application.c
+++ b/
gio/tests/basic-application.c
@@
-61,7
+61,7
@@
main (int argc, char **argv)
app = g_application_new ("org.gtk.TestApplication",
G_APPLICATION_HANDLES_OPEN |
- (
strcmp
(argv[1], "./cmd") == 0 ?
+ (
g_strcmp0
(argv[1], "./cmd") == 0 ?
G_APPLICATION_HANDLES_COMMAND_LINE
: 0));
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
@@
-73,6
+73,7
@@
main (int argc, char **argv)
g_application_set_inactivity_timeout (app, 1000);
#endif
status = g_application_run (app, argc - 1, argv + 1);
+
g_object_unref (app);
g_print ("exit status: %d\n", status);