mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 22:52: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);
|
||||
TextureListItem *titem;
|
||||
|
||||
item = WMGetListItem(lPtr, index);
|
||||
titem = (TextureListItem*)item->clientData;
|
||||
if (!titem) {
|
||||
WMReleaseColor(white);
|
||||
WMReleaseColor(black);
|
||||
return;
|
||||
}
|
||||
|
||||
width = rect->size.width;
|
||||
height = rect->size.height;
|
||||
x = rect->pos.x;
|
||||
@@ -1269,13 +1277,11 @@ paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
else
|
||||
XClearArea(dpy, d, x, y, width, height, False);
|
||||
|
||||
item = WMGetListItem(lPtr, index);
|
||||
titem = (TextureListItem*)item->clientData;
|
||||
|
||||
if (titem->preview)
|
||||
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0, TEXPREV_WIDTH,
|
||||
TEXPREV_HEIGHT, x + 5, y + 5);
|
||||
|
||||
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
||||
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
|
||||
|
||||
if ((1 << WMGetPopUpButtonSelectedItem(panel->secP)) & titem->selectedFor)
|
||||
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||
else if (titem->selectedFor)
|
||||
|
||||
Reference in New Issue
Block a user