changeset 18756:751f531e5a20

(get_system_name): Don't crash if Vsystem_name does not contain a string.
author Richard M. Stallman <rms@gnu.org>
date Sat, 12 Jul 1997 06:52:06 +0000
parents f2c1ffb0778a
children 9d6149f4c762
files src/editfns.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Sat Jul 12 06:51:51 1997 +0000
+++ b/src/editfns.c	Sat Jul 12 06:52:06 1997 +0000
@@ -747,7 +747,10 @@
 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,