Tracker: Unchecked dynamic_cast in FilePanelPriv.cpp, CID 300327
This commit is contained in:
parent
e5355e2814
commit
a76808e72e
@ -1075,13 +1075,16 @@ TFilePanel::SetButtonLabel(file_panel_button selector, const char* text)
|
|||||||
void
|
void
|
||||||
TFilePanel::SetSaveText(const char* text)
|
TFilePanel::SetSaveText(const char* text)
|
||||||
{
|
{
|
||||||
if (!text)
|
if (text == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BTextControl* textControl
|
BTextControl* textControl
|
||||||
= dynamic_cast<BTextControl*>(FindView("text view"));
|
= dynamic_cast<BTextControl*>(FindView("text view"));
|
||||||
textControl->SetText(text);
|
if (textControl != NULL) {
|
||||||
textControl->TextView()->SelectAll();
|
textControl->SetText(text);
|
||||||
|
if (textControl->TextView() != NULL)
|
||||||
|
textControl->TextView()->SelectAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user