Skip to content

Commit

Permalink
Add a null-pointer check for the Canvas::drawPicture() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
domchen committed Jan 17, 2025
1 parent 5474467 commit 57ca495
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ void Canvas::drawTextBlob(std::shared_ptr<TextBlob> textBlob, float x, float y,
}

void Canvas::drawPicture(std::shared_ptr<Picture> picture) {
if (picture == nullptr) {
return;
}
drawContext->drawPicture(std::move(picture), *mcState);
}

Expand Down

0 comments on commit 57ca495

Please sign in to comment.