From: Richard M. Stallman Date: Sat, 12 Jul 1997 06:52:06 +0000 (+0000) Subject: (get_system_name): Don't crash if Vsystem_name does not contain a string. X-Git-Tag: emacs-20.1~1190 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3d976a9a2b676411ead10a5e598f55da103a8134;p=emacs.git (get_system_name): Don't crash if Vsystem_name does not contain a string. --- diff --git a/src/editfns.c b/src/editfns.c index c3d3eedccc0..cdcf0165b86 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -747,7 +747,10 @@ DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, char * get_system_name () { - return (char *) XSTRING (Vsystem_name)->data; + if (STRINGP (Vsystem_name)) + return (char *) XSTRING (Vsystem_name)->data; + else + return ""; } DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0,