Coverity: fix WPrefs texturepanel negative array index read

This commit is contained in:
David Maciejak
2023-03-02 17:04:48 +00:00
committed by Carlos R. Mafra
parent 0e00c6b605
commit 682c2767c2
+1 -1
View File
@@ -689,7 +689,7 @@ static void changeTypeCallback(WMWidget *w, void *data)
int i;
newType = WMGetPopUpButtonSelectedItem(w);
if (newType == panel->currentType)
if (newType < 0 || newType == panel->currentType)
return;
if (panel->currentType >= 0) {