Fix use-after-free bug in osd_redraw
Removed XFreeFont call at end of osd_redraw() that was freeing the font stored in osd->font. The font is now properly loaded once in osd_init_display() and only freed in osd_destroy(). This fixes crashes and X11 errors when the OSD redraws multiple times. https://claude.ai/code/session_01H5sr8TkRyt6U1vdkVZRRvy
−4 · 1 file changed
-
src/osd.c+0 −4
@@ -515,10 +515,6 @@ void osd_redraw(osd_state_t* osd) { } } - if (font) { - XFreeFont(dpy, font); - } - XFlush(dpy); }