From 5d35fc6fd9c8dedb160a39b877bed0569f97259a Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 4 May 2012 15:04:07 +0400 Subject: [PATCH] gui/mediaplayer_setup.cpp: fix memleaks when using CMenuForwarder --- src/gui/mediaplayer_setup.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/mediaplayer_setup.cpp b/src/gui/mediaplayer_setup.cpp index 6ec6253d8..16954473b 100644 --- a/src/gui/mediaplayer_setup.cpp +++ b/src/gui/mediaplayer_setup.cpp @@ -88,9 +88,11 @@ int CMediaPlayerSetup::showMediaPlayerSetup() // intros mediaSetup->addIntroItems(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL); - - mediaSetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_HEAD, true, NULL, new CPictureViewerSetup(), "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - mediaSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, new CAudioPlayerSetup(), "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + + CPictureViewerSetup psetup; + mediaSetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_HEAD, true, NULL, &psetup, "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + CAudioPlayerSetup asetup; + mediaSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, &asetup, "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); int res = mediaSetup->exec (NULL, ""); mediaSetup->hide ();