don't leak the BMessenger. CID 928 and 929

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27729 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-09-25 10:11:20 +00:00
parent c404bd0e22
commit 2ad68d466a
+4 -2
View File
@@ -191,7 +191,8 @@ ExpanderWindow::MessageReceived(BMessage *msg)
switch (msg->what) {
case MSG_SOURCE:
if (!fSourcePanel) {
fSourcePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL,
BMessenger messenger(this);
fSourcePanel = new BFilePanel(B_OPEN_PANEL, &messenger, NULL,
B_FILE_NODE, false, NULL, new RuleRefFilter(fRules), true);
}
fSourcePanel->Show();
@@ -199,7 +200,8 @@ ExpanderWindow::MessageReceived(BMessage *msg)
case MSG_DEST:
if (!fDestPanel) {
fDestPanel = new DirectoryFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL,
BMessenger messenger(this);
fDestPanel = new DirectoryFilePanel(B_OPEN_PANEL, &messenger, NULL,
B_DIRECTORY_NODE, false, NULL, new DirectoryRefFilter(), true);
}
fDestPanel->Show();