1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

fixed crash in empty workspaces

This commit is contained in:
kojima
2004-10-15 01:00:36 +00:00
parent cd36d73886
commit 9402724e40

View File

@@ -247,8 +247,13 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
iconWidth = width / WMGetArrayItemCount(panel->windows) - ICON_EXTRASPACE;
}
if (iconWidth < 16 || WMGetArrayItemCount(panel->windows) == 0)
{
if (WMGetArrayItemCount(panel->windows) == 0) {
WMFreeArray(panel->windows);
wfree(panel);
return NULL;
}
if (iconWidth < 16) {
/* if there are too many windows, don't bother trying to show the panel */
return panel;