Commit 3d976a9a authored by Richard M. Stallman's avatar Richard M. Stallman

(get_system_name): Don't crash if Vsystem_name does not contain a string.

parent 662c2ef2
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment