(trunk libT) more NULL ptr safeguards

This commit is contained in:
Jordan Lee 2011-01-27 18:54:25 +00:00
parent 0c69ad0a80
commit f2f08f5469
1 changed files with 2 additions and 2 deletions

View File

@ -431,7 +431,7 @@ tr_strip_positional_args( const char* str )
buf = tr_renew( char, buf, bufsize );
}
for( out = buf; *str; ++str )
for( out = buf; str && *str; ++str )
{
*out++ = *str;
@ -450,7 +450,7 @@ tr_strip_positional_args( const char* str )
}
*out = '\0';
return strcmp( buf, in ) ? buf : in;
return !in || strcmp( buf, in ) ? buf : in;
}
/**