From c0afe2bac60c18cf25b8d5fa9aa9ac193ab952e4 Mon Sep 17 00:00:00 2001 From: David Timber Date: Fri, 1 Nov 2024 17:01:50 +0100 Subject: Fix crash bug, update doc --- src/xbouncing.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/xbouncing.c b/src/xbouncing.c index d1f83b4..2f15ef0 100644 --- a/src/xbouncing.c +++ b/src/xbouncing.c @@ -127,13 +127,12 @@ static void update_screen_info (void) { static void print_l18n_xopen_err (void) { const char *LANG = getenv("LANG"); - const char *msg; + const char *msg = "Could not open X display."; - if (strncmp(LANG, "ko", 2) == 0) { - msg = "X 서버 연결 실패."; - } - else { - msg = "Could not open X display."; + if (LANG != NULL) { + if (strncmp(LANG, "ko", 2) == 0) { + msg = "X 서버 연결 실패."; + } } fprintf(stderr, "%s\n", msg); -- cgit