fix possible segfault in chansrv if DISPLAY is not set

This commit is contained in:
Robert Milasan 2015-01-20 13:33:37 +01:00
parent 9c5c0660b2
commit f59c925f8b

View File

@ -1534,7 +1534,9 @@ main(int argc, char **argv)
display_text = g_getenv("DISPLAY");
LOGM((LOG_LEVEL_INFO, "main: DISPLAY env var set to %s", display_text));
get_display_num_from_display(display_text);
if (display_text)
get_display_num_from_display(display_text);
if (g_display_num == 0)
{