common picture: ++ exception case.

size() returns InsufficientCondition if it doesn't have any loaded data.
This commit is contained in:
Hermet Park 2021-07-02 11:37:35 +09:00 committed by Hermet Park
parent 27cac72d7d
commit 3f176b733b

View file

@ -85,6 +85,7 @@ Result Picture::size(float w, float h) noexcept
Result Picture::size(float* w, float* h) const noexcept
{
if (!pImpl->loader) return Result::InsufficientCondition;
if (w) *w = pImpl->w;
if (h) *h = pImpl->h;
return Result::Success;