mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 06:04:03 +00:00
wasm: validate empty data (#790)
This commit is contained in:
parent
b294a71613
commit
e91dcdb0de
1 changed files with 6 additions and 1 deletions
|
@ -47,7 +47,12 @@ public:
|
||||||
mErrorMsg = "None";
|
mErrorMsg = "None";
|
||||||
|
|
||||||
if (!mSwCanvas) {
|
if (!mSwCanvas) {
|
||||||
mErrorMsg = "Canvas is NULL";
|
mErrorMsg = "Canvas is NULL";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.empty()) {
|
||||||
|
mErrorMsg = "Data is empty";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue