mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
troff: avoid crash if home == NULL
R=rsc http://codereview.appspot.com/181070
This commit is contained in:
parent
7351eea28e
commit
6530d37d7f
1 changed files with 2 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue