changeset 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 bd36a0907b8d
children 84bfe7168c06
files lib-src/emacsclient.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/emacsclient.c	Fri Feb 20 17:53:00 2004 +0000
+++ b/lib-src/emacsclient.c	Fri Feb 20 23:54:53 2004 +0000
@@ -112,7 +112,7 @@
 {
   alternate_editor = getenv ("ALTERNATE_EDITOR");
   display = getenv ("DISPLAY");
-  if (strlen (display) == 0)
+  if (display && strlen (display) == 0)
     display = NULL;
   
   if (display)