From d0397c5424d5473bb432f23d7a51c30465e6471e Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 25 Sep 2008 14:03:25 +0000 Subject: [PATCH] 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 --- src/preferences/backgrounds/BackgroundsView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index c887a248b4..f38a505fba 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -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");