Browse Source

LibHTML: RenderingContext should keep the Palette alive

We were lugging around a reference to a temporary here.
Andreas Kling 5 năm trước cách đây
mục cha
commit
ffbe975ffc

+ 1 - 1
Libraries/LibHTML/RenderingContext.h

@@ -24,7 +24,7 @@ public:
 
 
 private:
 private:
     GPainter& m_painter;
     GPainter& m_painter;
-    const Palette& m_palette;
+    Palette m_palette;
     Rect m_viewport_rect;
     Rect m_viewport_rect;
     bool m_should_show_line_box_borders { false };
     bool m_should_show_line_box_borders { false };
 };
 };