mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
loader/svg: If link string is empty, not create picture object
An empty link causes the wrong loader to be found and causes various problems. related issue : https://github.com/thorvg/thorvg/issues/2078#issuecomment-2067726046
This commit is contained in:
parent
9183f1c11e
commit
a1ffa039bb
1 changed files with 1 additions and 1 deletions
|
@ -557,7 +557,7 @@ static bool _isValidImageMimeTypeAndEncoding(const char** href, const char** mim
|
|||
|
||||
static unique_ptr<Picture> _imageBuildHelper(SvgLoaderData& loaderData, SvgNode* node, const Box& vBox, const string& svgPath)
|
||||
{
|
||||
if (!node->node.image.href) return nullptr;
|
||||
if (!node->node.image.href || !strlen(node->node.image.href)) return nullptr;
|
||||
auto picture = Picture::gen();
|
||||
|
||||
TaskScheduler::async(false); //force to load a picture on the same thread
|
||||
|
|
Loading…
Add table
Reference in a new issue