summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 5a1c5ab30..dcaac9661 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -630,8 +630,8 @@ finddir(char *s)
      * whenever a node is added to or removed from the hash table, and *
      * whenever the value of $HOME changes.  (On startup, too.)        */
     if (!s) {
-	homenode.dir = home;
-	homenode.diff = strlen(home);
+	homenode.dir = home ? home : "";
+	homenode.diff = home ? strlen(home) : 0;
 	if(homenode.diff==1)
 	    homenode.diff = 0;
 	if(!finddir_full)