mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 11:36:25 +00:00
common picture: ++ exception case.
size() returns InsufficientCondition if it doesn't have any loaded data.
This commit is contained in:
parent
27cac72d7d
commit
3f176b733b
1 changed files with 1 additions and 0 deletions
|
@ -85,6 +85,7 @@ Result Picture::size(float w, float h) noexcept
|
||||||
|
|
||||||
Result Picture::size(float* w, float* h) const noexcept
|
Result Picture::size(float* w, float* h) const noexcept
|
||||||
{
|
{
|
||||||
|
if (!pImpl->loader) return Result::InsufficientCondition;
|
||||||
if (w) *w = pImpl->w;
|
if (w) *w = pImpl->w;
|
||||||
if (h) *h = pImpl->h;
|
if (h) *h = pImpl->h;
|
||||||
return Result::Success;
|
return Result::Success;
|
||||||
|
|
Loading…
Add table
Reference in a new issue