mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
fixed a crash
This commit is contained in:
@@ -134,11 +134,11 @@ static void changeImage(WSwitchPanel *panel, int index, int selected)
|
|||||||
WMPixmap *pixmap= NULL;
|
WMPixmap *pixmap= NULL;
|
||||||
WMLabel *label = WMGetFromArray(panel->icons, index);
|
WMLabel *label = WMGetFromArray(panel->icons, index);
|
||||||
RImage *image= WMGetFromArray(panel->images, index);
|
RImage *image= WMGetFromArray(panel->images, index);
|
||||||
WMScreen *wscr = WMWidgetScreen(label);
|
|
||||||
|
|
||||||
if (image) {
|
if (image && label) {
|
||||||
RColor bgColor;
|
RColor bgColor;
|
||||||
RImage *back;
|
RImage *back;
|
||||||
|
WMScreen *wscr= WMWidgetScreen(label);
|
||||||
|
|
||||||
if (selected) {
|
if (selected) {
|
||||||
back= RCloneImage(panel->tile);
|
back= RCloneImage(panel->tile);
|
||||||
@@ -161,7 +161,7 @@ static void changeImage(WSwitchPanel *panel, int index, int selected)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pixmap) {
|
if (pixmap && label) {
|
||||||
WMSetLabelImage(label, pixmap);
|
WMSetLabelImage(label, pixmap);
|
||||||
WMSetLabelImagePosition(label, WIPImageOnly);
|
WMSetLabelImagePosition(label, WIPImageOnly);
|
||||||
WMReleasePixmap(pixmap);
|
WMReleasePixmap(pixmap);
|
||||||
|
|||||||
Reference in New Issue
Block a user