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;
|
||||
WMLabel *label = WMGetFromArray(panel->icons, index);
|
||||
RImage *image= WMGetFromArray(panel->images, index);
|
||||
WMScreen *wscr = WMWidgetScreen(label);
|
||||
|
||||
if (image) {
|
||||
if (image && label) {
|
||||
RColor bgColor;
|
||||
RImage *back;
|
||||
WMScreen *wscr= WMWidgetScreen(label);
|
||||
|
||||
if (selected) {
|
||||
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);
|
||||
WMSetLabelImagePosition(label, WIPImageOnly);
|
||||
WMReleasePixmap(pixmap);
|
||||
|
||||
Reference in New Issue
Block a user