mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
moviebrowser: fix possible memleak in initSeriesMenu()
thx satbaby for hints
Origin commit data
------------------
Branch: ni/coolstream
Commit: 90406340a4
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-06-25 (Tue, 25 Jun 2019)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -58,7 +58,6 @@
|
||||
#include <gui/components/cc.h>
|
||||
#include <gui/widget/msgbox.h>
|
||||
#include <gui/widget/stringinput.h>
|
||||
#include <gui/widget/keyboard_input.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <gui/nfs.h>
|
||||
@@ -3433,12 +3432,11 @@ void CMovieBrowser::initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* m
|
||||
}
|
||||
|
||||
#define MAX_STRING 30
|
||||
void CMovieBrowser::initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info)
|
||||
void CMovieBrowser::initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info, CKeyboardInput *SerieUserInput)
|
||||
{
|
||||
SeriesMenu->addIntroItems(LOCALE_MOVIEBROWSER_SERIE_HEAD);
|
||||
|
||||
CKeyboardInput *serieUserInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, MAX_STRING); //TODO: hints
|
||||
SeriesMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName, serieUserInput));
|
||||
SeriesMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName, SerieUserInput));
|
||||
|
||||
SeriesMenu->addItem(GenericMenuSeparatorLine);
|
||||
for (unsigned int li = 0; li < m_vHandleSerienames.size(); li++)
|
||||
@@ -3484,7 +3482,8 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
|
||||
|
||||
// init series menu
|
||||
CMenuWidget serieMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
|
||||
initSeriesMenu(&serieMenu, movie_info);
|
||||
CKeyboardInput serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, MAX_STRING); //TODO: hints
|
||||
initSeriesMenu(&serieMenu, movie_info, &serieUserInput);
|
||||
|
||||
// init update movie info menu
|
||||
CMenuWidget movieInfoMenuUpdate(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
|
||||
|
Reference in New Issue
Block a user