comparison lib-src/emacsclient.c @ 83052:011894b9950a

Fix a crash in emacsclient when DISPLAY is unset. lib-src/emacsclient.c (decode_options): Don't call strlen on a null pointer. Reported by Ami Fishman. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-92
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 20 Feb 2004 23:54:53 +0000
parents 8ca11496d25c
children e7e9448cb3a0
comparison
equal deleted inserted replaced
83051:bd36a0907b8d 83052:011894b9950a
110 int argc; 110 int argc;
111 char **argv; 111 char **argv;
112 { 112 {
113 alternate_editor = getenv ("ALTERNATE_EDITOR"); 113 alternate_editor = getenv ("ALTERNATE_EDITOR");
114 display = getenv ("DISPLAY"); 114 display = getenv ("DISPLAY");
115 if (strlen (display) == 0) 115 if (display && strlen (display) == 0)
116 display = NULL; 116 display = NULL;
117 117
118 if (display) 118 if (display)
119 window_system = 1; 119 window_system = 1;
120 else 120 else