X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/39934deb5202149f98198c111a35c21cb4d0d0f8..b0dd13945d74dc9e6c4747fc917d0cb2b7acba1d:/unix/uxstore.c diff --git a/unix/uxstore.c b/unix/uxstore.c index c46b9a29..85d72ca7 100644 --- a/unix/uxstore.c +++ b/unix/uxstore.c @@ -85,6 +85,8 @@ static void make_filename(char *filename, int index, const char *subname) char *home; int len; home = getenv("HOME"); + if (!home) + home="/"; strncpy(filename, home, FILENAME_MAX); len = strlen(filename); if (index == INDEX_SESSION) {