CID-1512: ensure that label is never dereferenced while being NULL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38190 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
26411b5359
commit
9602d07543
@ -288,7 +288,7 @@ AntialiasingSettingsView::_SetCurrentAntialiasing()
|
||||
void
|
||||
AntialiasingSettingsView::_SetCurrentHinting()
|
||||
{
|
||||
const char* label = NULL;
|
||||
const char* label;
|
||||
switch (fCurrentHinting) {
|
||||
case HINTING_MODE_OFF:
|
||||
label = kNoHintingLabel;
|
||||
@ -299,6 +299,8 @@ AntialiasingSettingsView::_SetCurrentHinting()
|
||||
case HINTING_MODE_MONOSPACED_ONLY:
|
||||
label = kMonospacedHintingLabel;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
BMenuItem *item = fHintingMenu->FindItem(B_TRANSLATE_NOCOLLECT(label));
|
||||
|
Loading…
Reference in New Issue
Block a user