Skip to content

Commit

Permalink
Modify the return value of FontGlyphFace::asFont,making it always tru…
Browse files Browse the repository at this point in the history
…e. (#375)
  • Loading branch information
shlzxjp authored Dec 11, 2024
1 parent 6fecb4a commit 130a8a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/FontGlyphFace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ Rect FontGlyphFace::getBounds(GlyphID glyphID) const {
}

bool FontGlyphFace::asFont(Font* font) const {
if (font == nullptr) {
return false;
if (font != nullptr) {
*font = _font;
}
*font = _font;

return true;
}
} // namespace tgfx

0 comments on commit 130a8a9

Please sign in to comment.