don't leak the BMessengers. CID 1009 and 1010

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27742 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-09-25 14:03:25 +00:00
parent e32494d24f
commit d0397c5424
@@ -283,11 +283,12 @@ BackgroundsView::AllAttached()
get_ref_for_path(path.Path(), &ref);
}
fPanel = new ImageFilePanel(B_OPEN_PANEL, new BMessenger(this), &ref,
BMessenger messenger(this);
fPanel = new ImageFilePanel(B_OPEN_PANEL, &messenger, &ref,
B_FILE_NODE, false, NULL, new CustomRefFilter(true));
fPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Select");
fFolderPanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL,
fFolderPanel = new BFilePanel(B_OPEN_PANEL, &messenger, NULL,
B_DIRECTORY_NODE, false, NULL, new CustomRefFilter(false));
fFolderPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Select");