mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +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";
|
||||
|
||||
if (!mSwCanvas) {
|
||||
mErrorMsg = "Canvas is NULL";
|
||||
mErrorMsg = "Canvas is NULL";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (data.empty()) {
|
||||
mErrorMsg = "Data is empty";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue