1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 14:42:29 +01:00

WPrefs: Avoid crash when config file does not contain wmdrawer settings

When first using the wmdrawer panel of WPrefs the settings

ClipAutoexpandDelay
ClipAutocollapseDelay
ClipAutoraiseDelay
ClipAutolowerDelay

are not yet saved in the user's config file and 'value' ends up
being undefined in showData() leading to a crash in adjustButtonSelectionBasedOnValue().

This patch is a workaround to make it possible to choose the config values for the
first time using WPrefs.
This commit is contained in:
Carlos R. Mafra
2013-04-12 02:46:12 +01:00
parent 311255a646
commit f863dafef1

View File

@@ -77,6 +77,10 @@ static void pushAutoDelayButton(WMWidget *w, void *data)
static void adjustButtonSelectionBasedOnValue(_Panel *panel, int row, char *value) static void adjustButtonSelectionBasedOnValue(_Panel *panel, int row, char *value)
{ {
int j; int j;
if (!value)
return;
for (j = 0; j < 5; j++) for (j = 0; j < 5; j++)
{ {
int isThatOne = !strcmp(autoDelayPresetValues[j], value); int isThatOne = !strcmp(autoDelayPresetValues[j], value);