troff: avoid crash if home == NULL

R=rsc
http://codereview.appspot.com/181070
This commit is contained in:
Russ Cox 2009-12-27 09:22:43 -08:00
parent 7351eea28e
commit 6530d37d7f

View file

@ -189,7 +189,8 @@ char *DWBhome(void)
if ( (home = DWBHOME) == NULL || *home == '\0' || *home == ' ' )
home = NULL;
} /* End if */
home = unsharp(home);
if ( home != NULL )
home = unsharp(home);
} /* End if */
while (home && *home == '/' && *(home +1) == '/') /* remove extra slashes */