Commit 75e68b87 authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu

* lwlib/lwlib-Xaw.c (draw_text) [HAVE_XFT]: Fix memory leak.

parent 70f31757
Pipeline #1380 passed with stage
in 49 minutes and 46 seconds
......@@ -170,11 +170,12 @@ draw_text (struct widget_xft_data *data, char *lbl, int inverse)
int x = inverse ? 0 : 2;
char *bp = lbl;
data->xft_draw = XftDrawCreate (XtDisplay (data->widget),
data->p,
DefaultVisual (XtDisplay (data->widget),
screen),
DefaultColormapOfScreen (sc));
if (!data->xft_draw)
data->xft_draw = XftDrawCreate (XtDisplay (data->widget),
data->p,
DefaultVisual (XtDisplay (data->widget),
screen),
DefaultColormapOfScreen (sc));
XftDrawRect (data->xft_draw,
inverse ? &data->xft_fg : &data->xft_bg,
0, 0, data->p_width, data->p_height);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment