don't leak the bmessenger. CID 888
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27746 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -847,6 +847,7 @@ TFavoritesConfigWindow::PromptForAdd()
|
|||||||
fAddPanel->Show();
|
fAddPanel->Show();
|
||||||
// does an activate on the window
|
// does an activate on the window
|
||||||
else {
|
else {
|
||||||
|
BMessenger messenger(this, this);
|
||||||
// determine a starting point for where apps are added from
|
// determine a starting point for where apps are added from
|
||||||
char appPath[B_PATH_NAME_LENGTH];
|
char appPath[B_PATH_NAME_LENGTH];
|
||||||
|
|
||||||
@@ -856,11 +857,10 @@ TFavoritesConfigWindow::PromptForAdd()
|
|||||||
|
|
||||||
// get reference to application directory
|
// get reference to application directory
|
||||||
get_ref_for_path(appPath, &ref);
|
get_ref_for_path(appPath, &ref);
|
||||||
|
fAddPanel = new BFilePanel(B_OPEN_PANEL, &messenger,
|
||||||
fAddPanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this, this),
|
|
||||||
&ref, fFilePanelNodeFlavors, true);
|
&ref, fFilePanelNodeFlavors, true);
|
||||||
} else
|
} else
|
||||||
fAddPanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this, this),
|
fAddPanel = new BFilePanel(B_OPEN_PANEL, &messenger,
|
||||||
NULL, fFilePanelNodeFlavors, true);
|
NULL, fFilePanelNodeFlavors, true);
|
||||||
|
|
||||||
fAddPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Add");
|
fAddPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Add");
|
||||||
|
|||||||
Reference in New Issue
Block a user