summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-03-27 21:44:56 -0400
committerMatthias Clasen <mclasen@redhat.com>2023-03-27 21:44:56 -0400
commitcacecd2fb54025a59db0b5b02b5e52663b17e941 (patch)
tree7ecc075d7bf42892d78db7693a2458d1e5a9db30 /gtk/gtkmain.c
parent321877e94bcd7d1d7aeae61d4c949b43dab1e552 (diff)
downloadgtk+-cacecd2fb54025a59db0b5b02b5e52663b17e941.tar.gz
Improve an error message
We were producing a misleading error message when gtk_init() fails. Fixes: #5704
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 3a688958ce..ad41fa5749 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -658,10 +658,7 @@ gtk_init (void)
{
if (!gtk_init_check ())
{
- const char *display_name_arg;
-
- display_name_arg = getenv ("DISPLAY");
- g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : "");
+ g_warning ("Failed to open display");
exit (1);
}
}