Fix bug in WB combobox readout
[xboard.git] / winboard / wsettings.c
index 10bb427..5098d54 100644 (file)
@@ -387,7 +387,7 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList)
                if(!success) break;\r
                new = -1;\r
                for(k=0; k<optionList[j].max; k++) {\r
-                   if(!strcmp(choices[k], newText)) new = k;\r
+                   if(choices[k] && !strcmp(choices[k], newText)) new = k;\r
                }\r
                if(!cps && new > 0) {\r
                    if(*(char**)optionList[j].target) free(*(char**)optionList[j].target);\r