mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 11:36:25 +00:00
text/ttf: fixed all memory violations.
This commit is contained in:
parent
e62a8668e7
commit
97f41b4ad5
2 changed files with 2 additions and 1 deletions
|
@ -149,7 +149,7 @@ static uint32_t* _codepoints(const char* text, size_t n)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
utf32[i] = 0; //end of the unicdoe
|
utf32[i - 1] = 0; //end of the unicdoe
|
||||||
return utf32;
|
return utf32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ struct Text::Impl
|
||||||
|
|
||||||
~Impl()
|
~Impl()
|
||||||
{
|
{
|
||||||
|
free(utf8);
|
||||||
LoaderMgr::retrieve(loader);
|
LoaderMgr::retrieve(loader);
|
||||||
delete(paint);
|
delete(paint);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue