X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/39934deb5202149f98198c111a35c21cb4d0d0f8..ff677091f222e8175b03a7ff03d4e56bcf93dc24:/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) {