projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f920723
)
buildertool: Exit orderly
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 12 Jul 2023 19:49:11 +0000
(15:49 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 12 Jul 2023 19:49:11 +0000
(15:49 -0400)
The validate command does need a display connection,
for better or worse. So exit in an orderly fashion
if we don't have one, instead of crashing.
Fixes: #5948
tools/gtk-builder-tool-validate.c
patch
|
blob
|
history
diff --git
a/tools/gtk-builder-tool-validate.c
b/tools/gtk-builder-tool-validate.c
index 011b8b8d79f2b568aeb971e11cb60e10e62ad8a8..7cd0695b1939d0cdfbce3202ca8cdd98e0419307 100644
(file)
--- a/
tools/gtk-builder-tool-validate.c
+++ b/
tools/gtk-builder-tool-validate.c
@@
-263,6
+263,12
@@
do_validate (int *argc, const char ***argv)
};
int i;
+ if (gdk_display_get_default () == NULL)
+ {
+ g_printerr (_("Could not initialize windowing system\n"));
+ exit (1);
+ }
+
g_set_prgname ("gtk4-builder-tool validate");
context = g_option_context_new (NULL);
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);