mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
loader/svg: Fix empty id to null
empty id is invalid. Therefore, set it to null and make it is not used. issue: https://github.com/thorvg/thorvg/issues/1977
This commit is contained in:
parent
b7a57e65c1
commit
b400512fda
1 changed files with 1 additions and 0 deletions
|
@ -89,6 +89,7 @@ static char* _skipSpace(const char* str, const char* end)
|
|||
static char* _copyId(const char* str)
|
||||
{
|
||||
if (!str) return nullptr;
|
||||
if (strlen(str) == 0) return nullptr;
|
||||
|
||||
return strdup(str);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue