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

* 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) ...@@ -170,11 +170,12 @@ draw_text (struct widget_xft_data *data, char *lbl, int inverse)
int x = inverse ? 0 : 2; int x = inverse ? 0 : 2;
char *bp = lbl; char *bp = lbl;
data->xft_draw = XftDrawCreate (XtDisplay (data->widget), if (!data->xft_draw)
data->p, data->xft_draw = XftDrawCreate (XtDisplay (data->widget),
DefaultVisual (XtDisplay (data->widget), data->p,
screen), DefaultVisual (XtDisplay (data->widget),
DefaultColormapOfScreen (sc)); screen),
DefaultColormapOfScreen (sc));
XftDrawRect (data->xft_draw, XftDrawRect (data->xft_draw,
inverse ? &data->xft_fg : &data->xft_bg, inverse ? &data->xft_fg : &data->xft_bg,
0, 0, data->p_width, data->p_height); 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