mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-30 10:22:34 +01:00
fixed crash in appearances section
This commit is contained in:
@@ -1259,6 +1259,14 @@ paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
|||||||
WMColor *black = WMBlackColor(scr);
|
WMColor *black = WMBlackColor(scr);
|
||||||
TextureListItem *titem;
|
TextureListItem *titem;
|
||||||
|
|
||||||
|
item = WMGetListItem(lPtr, index);
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
if (!titem) {
|
||||||
|
WMReleaseColor(white);
|
||||||
|
WMReleaseColor(black);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
width = rect->size.width;
|
width = rect->size.width;
|
||||||
height = rect->size.height;
|
height = rect->size.height;
|
||||||
x = rect->pos.x;
|
x = rect->pos.x;
|
||||||
@@ -1269,12 +1277,10 @@ paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
|||||||
else
|
else
|
||||||
XClearArea(dpy, d, x, y, width, height, False);
|
XClearArea(dpy, d, x, y, width, height, False);
|
||||||
|
|
||||||
item = WMGetListItem(lPtr, index);
|
|
||||||
titem = (TextureListItem*)item->clientData;
|
|
||||||
|
|
||||||
if (titem->preview)
|
if (titem->preview)
|
||||||
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0, TEXPREV_WIDTH,
|
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
||||||
TEXPREV_HEIGHT, x + 5, y + 5);
|
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
|
||||||
|
|
||||||
if ((1 << WMGetPopUpButtonSelectedItem(panel->secP)) & titem->selectedFor)
|
if ((1 << WMGetPopUpButtonSelectedItem(panel->secP)) & titem->selectedFor)
|
||||||
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||||
|
|||||||
Reference in New Issue
Block a user