Tracker: Unchecked dynamic_cast, CID 603126
This commit is contained in:
parent
f0eb64b40d
commit
1371d18c36
@ -895,7 +895,12 @@ FindPanel::~FindPanel()
|
||||
void
|
||||
FindPanel::AttachedToWindow()
|
||||
{
|
||||
BNode* node = dynamic_cast<FindWindow*>(Window())->QueryNode();
|
||||
FindWindow* findWindow = dynamic_cast<FindWindow*>(Window());
|
||||
ASSERT(findWindow != NULL);
|
||||
if (findWindow == NULL)
|
||||
return;
|
||||
|
||||
BNode* node = findWindow->QueryNode();
|
||||
fSearchModeMenu->SetTargetForItems(this);
|
||||
fQueryName->SetTarget(this);
|
||||
fLatch->SetTarget(this);
|
||||
@ -905,7 +910,7 @@ FindPanel::AttachedToWindow()
|
||||
// on which mime type is preselected
|
||||
RestoreWindowState(node);
|
||||
|
||||
if (!Window()->CurrentFocus()) {
|
||||
if (!findWindow->CurrentFocus()) {
|
||||
// try to pick a good focus if we restore to one already
|
||||
BTextControl* textControl
|
||||
= dynamic_cast<BTextControl*>(FindView("TextControl"));
|
||||
@ -941,7 +946,7 @@ FindPanel::AttachedToWindow()
|
||||
if (fDraggableIcon != NULL)
|
||||
fDraggableIcon->SetTarget(BMessenger(this));
|
||||
|
||||
fRecentQueries->SetTargetForItems(Window());
|
||||
fRecentQueries->SetTargetForItems(findWindow);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user