From 1a19d2c2df7e1f48bc3e6e2c63551f54279790d5 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Sat, 4 Sep 2021 14:26:28 +0300 Subject: [PATCH] LibGfx: Stop using a Utf8View that points to a temporary String --- Userland/Libraries/LibGfx/Painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 039553331c..69b19edcae 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -1492,7 +1492,7 @@ void Painter::do_draw_text(IntRect const& rect, Utf8View const& text, Font const // compatible with draw_text_line. StringBuilder builder; builder.append(directional_run.text()); - auto line_text = Utf8View { builder.to_string() }; + auto line_text = Utf8View { builder.string_view() }; draw_text_line(run_rect, line_text, font, alignment, directional_run.direction(), draw_glyph); if (line_direction == TextDirection::LTR)