]> git.eshelyaron.com Git - emacs.git/commitdiff
(get_system_name): Don't crash if Vsystem_name does not contain a string.
authorRichard M. Stallman <rms@gnu.org>
Sat, 12 Jul 1997 06:52:06 +0000 (06:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 12 Jul 1997 06:52:06 +0000 (06:52 +0000)
src/editfns.c

index c3d3eedccc0fc11f76420f7c11081d7fd32fd6d8..cdcf0165b86bcbf985e9bc0e2440cee857a38346 100644 (file)
@@ -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,