Fix CID991252: Possible NULL dereference on scheme name
The color scheme name pointer is dereferenced but was not checked for NULL value.
This commit is contained in:
parent
b249a7ce43
commit
4e17bdd83f
@ -399,6 +399,8 @@ AppearancePrefView::_SetCurrentColorScheme()
|
||||
}
|
||||
|
||||
for (int32 i = 0; i < fColorSchemeField->Menu()->CountItems(); i++) {
|
||||
if (currentSchemeName == NULL)
|
||||
break;
|
||||
BMenuItem* item = fColorSchemeField->Menu()->ItemAt(i);
|
||||
if (strcmp(item->Label(), currentSchemeName) == 0) {
|
||||
item->SetMarked(true);
|
||||
|
Loading…
Reference in New Issue
Block a user