Skip to content

Commit

Permalink
karm-gfx: Fixed use after free in glyph rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed May 3, 2024
1 parent 4c0e2be commit 8fad910
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/karm-gfx/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void Context::fill(Math::Vec2i pos, Media::Icon icon) {
}

void Context::stroke(Math::Vec2f baseline, Media::Glyph glyph) {
auto &f = textFont();
auto f = textFont();

_useSpaa = true;
save();
Expand All @@ -281,7 +281,7 @@ void Context::stroke(Math::Vec2f baseline, Media::Glyph glyph) {
}

void Context::fill(Math::Vec2f baseline, Media::Glyph glyph) {
auto &f = textFont();
auto f = textFont();

_useSpaa = true;
save();
Expand All @@ -303,7 +303,7 @@ void Context::fill(Math::Vec2f baseline, Rune rune) {
}

void Context::stroke(Math::Vec2f baseline, Str str) {
auto &f = textFont();
auto f = textFont();

bool first = true;
Media::Glyph prev{0};
Expand All @@ -321,7 +321,7 @@ void Context::stroke(Math::Vec2f baseline, Str str) {
}

void Context::fill(Math::Vec2f baseline, Str str) {
auto &f = textFont();
auto f = textFont();

bool first = true;
Media::Glyph prev{0};
Expand Down

0 comments on commit 8fad910

Please sign in to comment.