Tracker: Unchecked dynamic_cast, CID 600349

This commit is contained in:
John Scipione 2014-07-24 22:03:32 -04:00
parent 9fc1e7ffae
commit 6ef1768d76
1 changed files with 3 additions and 2 deletions

View File

@ -1599,12 +1599,13 @@ FindPanel::SwitchMode(uint32 mode)
ShowOrHideMimeTypeMenu();
AddByNameOrFormulaItems();
if (buffer.Length()) {
if (buffer.Length() > 0) {
ASSERT(mode == kByFormulaItem
|| oldMode == kByAttributeItem);
BTextControl* textControl
= dynamic_cast<BTextControl*>(FindView("TextControl"));
textControl->SetText(buffer.String());
if (textControl != NULL)
textControl->SetText(buffer.String());
}
break;
}