1
0
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:
kojima
2004-10-18 02:36:32 +00:00
parent 1076645853
commit 66ec682107

View File

@@ -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);