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