From 7eaaba1d58d1baeb35288e66ee5e9703ec10cdbe Mon Sep 17 00:00:00 2001 From: chriszero Date: Sat, 31 Jan 2015 15:39:45 +0100 Subject: Fixes segfault in lcdproc, and probably graphtft --- hlsPlayerControl.cpp | 8 ++++++++ hlsPlayerControl.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hlsPlayerControl.cpp b/hlsPlayerControl.cpp index b458f87..8d65310 100644 --- a/hlsPlayerControl.cpp +++ b/hlsPlayerControl.cpp @@ -40,6 +40,14 @@ cHlsPlayerControl::cHlsPlayerControl(cHlsPlayer* Player, plexclient::MediaContai cStatus::MsgReplaying(this, m_title.c_str(), m_pVideo->m_Media.m_sPartFile.c_str(), true); } +cHlsPlayerControl::~cHlsPlayerControl() +{ + dsyslog("[plex]: '%s'", __FUNCTION__); + delete player; + Hide(); + cStatus::MsgReplaying(this, NULL, NULL, false); +} + cString cHlsPlayerControl::GetHeader(void) { return m_title.c_str(); diff --git a/hlsPlayerControl.h b/hlsPlayerControl.h index 9b51c97..2f7347b 100644 --- a/hlsPlayerControl.h +++ b/hlsPlayerControl.h @@ -34,6 +34,7 @@ protected: public: static cControl* Create(plexclient::Video* Video); cHlsPlayerControl(cHlsPlayer* Player, plexclient::MediaContainer* Container); + virtual ~cHlsPlayerControl(); virtual void Show(void); virtual void Hide(void); -- cgit v1.2.3