forked from enlightenment/efl
Remove possivle null pointer.
Reported in: http://people.profusion.mobi/~lfelipe/static_analysis/efl/efl-53990/eina/2010-10-29-1/report-mqFB7z.html#EndPath SVN revision: 53998
This commit is contained in:
parent
db43f575ef
commit
1e78927ed1
|
@ -657,7 +657,7 @@ eina_stringshare_add_length(const char *str, unsigned int slen)
|
|||
{
|
||||
DBG("str=%p (%.*s), slen=%u", str, slen, str ? str : "", slen);
|
||||
|
||||
if (slen <= 0)
|
||||
if ((!str) || (slen <= 0))
|
||||
return "";
|
||||
else if (slen == 1)
|
||||
return (const char *)_eina_stringshare_single + ((*str) << 1);
|
||||
|
|
Loading…
Reference in New Issue