Tracker: Unchecked dynamic_cast, CID 600348

This commit is contained in:
John Scipione 2014-07-24 22:01:59 -04:00
parent d2af6ff104
commit 9fc1e7ffae

View File

@ -368,8 +368,6 @@ void
FindWindow::GetPredicateString(BString& predicate, bool& dynamicDate)
{
BQuery query;
BTextControl* textControl
= dynamic_cast<BTextControl*>(FindView("TextControl"));
switch (fBackground->Mode()) {
case kByNameItem:
fBackground->GetByNamePredicate(&query);
@ -377,8 +375,13 @@ FindWindow::GetPredicateString(BString& predicate, bool& dynamicDate)
break;
case kByFormulaItem:
{
BTextControl* textControl
= dynamic_cast<BTextControl*>(FindView("TextControl"));
if (textControl != NULL)
predicate.SetTo(textControl->TextView()->Text(), 1023);
break;
}
case kByAttributeItem:
fBackground->GetByAttrPredicate(&query, dynamicDate);