diff options
author | chriszero <zerov83@gmail.com> | 2015-06-23 20:53:13 +0200 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-06-23 20:53:13 +0200 |
commit | 4a54de45b40483e578fa3e97784532e57fedbe52 (patch) | |
tree | 2859fedf22bdf418e2517aa19810c4a0e8126c3b | |
parent | 7688256dac7261f2461776fadbcd3185a2a42b4f (diff) | |
download | vdr-plugin-plex-4a54de45b40483e578fa3e97784532e57fedbe52.tar.gz vdr-plugin-plex-4a54de45b40483e578fa3e97784532e57fedbe52.tar.bz2 |
Fixes segfault with recent skindesigner.
-rw-r--r-- | browserGrid.cpp | 8 | ||||
-rw-r--r-- | browserGrid.h | 2 | ||||
-rw-r--r-- | plexSdOsd.cpp | 4 | ||||
-rw-r--r-- | plexSdOsd.h | 2 | ||||
-rw-r--r-- | viewGridNavigator.cpp | 2 | ||||
-rw-r--r-- | viewGridNavigator.h | 6 |
6 files changed, 12 insertions, 12 deletions
diff --git a/browserGrid.cpp b/browserGrid.cpp index c0cd03a..4dff8a0 100644 --- a/browserGrid.cpp +++ b/browserGrid.cpp @@ -6,7 +6,7 @@ #include "plex.h" #include "pictureCache.h" -cBrowserGrid::cBrowserGrid(skindesignerapi::cOsdView* rootView) : cViewGridNavigator(rootView) +cBrowserGrid::cBrowserGrid(std::shared_ptr<skindesignerapi::cOsdView> rootView) : cViewGridNavigator(rootView) { m_pBackground = std::shared_ptr<skindesignerapi::cViewElement>(rootView->GetViewElement(eViewElementsRoot::verBackground)); m_pHeader = std::shared_ptr<skindesignerapi::cViewElement>(rootView->GetViewElement(eViewElementsRoot::verHeader)); @@ -23,13 +23,13 @@ cBrowserGrid::cBrowserGrid(skindesignerapi::cOsdView* rootView) : cViewGridNavig Config *conf = &Config::GetInstance(); if(conf->DefaultViewMode == ViewMode::Cover) { - SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid>(m_pRootView->GetViewGrid(eViewGrids::vgCover) )); + SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid>(rootView->GetViewGrid(eViewGrids::vgCover) )); SetGridDimensions(conf->CoverGridRows, conf->CoverGridColumns); } else if(conf->DefaultViewMode == ViewMode::Detail) { - SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid>(m_pRootView->GetViewGrid(eViewGrids::vgDetail) )); + SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid>(rootView->GetViewGrid(eViewGrids::vgDetail) )); SetGridDimensions(conf->DetailGridRows, conf->DetailGridColumns); } else if(conf->DefaultViewMode == ViewMode::List) { - SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid>(m_pRootView->GetViewGrid(eViewGrids::vgList) )); + SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid>(rootView->GetViewGrid(eViewGrids::vgList) )); SetGridDimensions(conf->ListGridRows, conf->ListGridColumns); } diff --git a/browserGrid.h b/browserGrid.h index a901fc7..a880b76 100644 --- a/browserGrid.h +++ b/browserGrid.h @@ -65,7 +65,7 @@ private: void DrawScrollbar(); public: - cBrowserGrid(skindesignerapi::cOsdView* rootView); + cBrowserGrid(std::shared_ptr<skindesignerapi::cOsdView> rootView); ~cBrowserGrid(); //cBrowserGrid(skindesignerapi::cViewGrid* viewGrid, std::shared_ptr<plexclient::Plexservice> service); std::shared_ptr<plexclient::MediaContainer> MediaContainer() { return m_pContainer; } diff --git a/plexSdOsd.cpp b/plexSdOsd.cpp index 1c25fed..1d789d7 100644 --- a/plexSdOsd.cpp +++ b/plexSdOsd.cpp @@ -14,12 +14,12 @@ cPlexSdOsd::cPlexSdOsd() cPlexSdOsd::~cPlexSdOsd() { + m_pRootView->Deactivate(true); if(m_pBrowserGrid) m_pBrowserGrid->Clear(); if(m_pMessage) m_pMessage->Clear(); cPictureCache::GetInstance().RemoveAll(); - delete m_pRootView; } bool cPlexSdOsd::SdSupport() @@ -43,7 +43,7 @@ void cPlexSdOsd::Show(void) return; } - m_pRootView = GetOsdView(eViews::viRootView); + m_pRootView = std::shared_ptr<skindesignerapi::cOsdView>(GetOsdView(eViews::viRootView)); if (!m_pRootView) { esyslog("[plex]: used skindesigner skin does not support plex"); return; diff --git a/plexSdOsd.h b/plexSdOsd.h index 8b2c33e..bacf3dc 100644 --- a/plexSdOsd.h +++ b/plexSdOsd.h @@ -54,7 +54,7 @@ private: std::shared_ptr<skindesignerapi::cViewElement> m_pMessage; bool m_messageDisplayed; - skindesignerapi::cOsdView* m_pRootView; + std::shared_ptr<skindesignerapi::cOsdView> m_pRootView; void Flush(); //void SwitchGrid(ePlexMenuTab currentTab); diff --git a/viewGridNavigator.cpp b/viewGridNavigator.cpp index 83c86e3..8600edd 100644 --- a/viewGridNavigator.cpp +++ b/viewGridNavigator.cpp @@ -12,7 +12,7 @@ cGridElement::cGridElement() m_bInit = true; } -cViewGridNavigator::cViewGridNavigator(skindesignerapi::cOsdView* rootView) +cViewGridNavigator::cViewGridNavigator(std::shared_ptr<skindesignerapi::cOsdView> rootView) { m_columns = 2; m_rows = 2; diff --git a/viewGridNavigator.h b/viewGridNavigator.h index 800acd3..90e732a 100644 --- a/viewGridNavigator.h +++ b/viewGridNavigator.h @@ -38,8 +38,8 @@ protected: int m_rows; int m_columns; + std::shared_ptr<skindesignerapi::cOsdView> m_pRootView; std::shared_ptr<skindesignerapi::cViewGrid> m_pGrid; - skindesignerapi::cOsdView* m_pRootView; bool m_newDimensions; bool m_setIterator; @@ -54,10 +54,10 @@ protected: void SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid> grid); public: - cViewGridNavigator(skindesignerapi::cOsdView* rootView); + cViewGridNavigator(std::shared_ptr<skindesignerapi::cOsdView> rootView); void SetGridDimensions(int rows, int columns); virtual void Flush() { m_pGrid->Display(); }; - virtual void Clear() { m_pGrid->Clear(); }; + virtual void Clear() = 0; virtual bool NavigateLeft(); virtual bool NavigateRight(); virtual bool NavigateUp(); |