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:
Tiago Rezende Campos Falcao 2010-10-29 17:19:15 +00:00
parent db43f575ef
commit 1e78927ed1
1 changed files with 1 additions and 1 deletions

View File

@ -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);