mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
lottie: fixed memory violation.
set the dirName as the current location by default. issue: https://github.com/thorvg/thorvg/issues/2733
This commit is contained in:
parent
7a6a89cf26
commit
68fff066fc
1 changed files with 2 additions and 3 deletions
|
@ -195,9 +195,8 @@ bool LottieLoader::open(const char* data, uint32_t size, const std::string& rpat
|
||||||
this->size = size;
|
this->size = size;
|
||||||
this->copy = copy;
|
this->copy = copy;
|
||||||
|
|
||||||
if (!rpath.empty()) {
|
if (rpath.empty()) this->dirName = strdup(".");
|
||||||
this->dirName = strdup(rpath.c_str());
|
else this->dirName = strdup(rpath.c_str());
|
||||||
}
|
|
||||||
|
|
||||||
return header();
|
return header();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue