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