summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-08-22 10:33:59 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-08-22 10:33:59 +0200
commit99321b371acd247bb41737df50af6f4084472098 (patch)
treef57fa0f15bf54f875eb97946abb9f510dc07195f /device.c
parent58c9fdc8c5cae831b2321db1c46a21e55ab3b6a6 (diff)
downloadvdr-99321b371acd247bb41737df50af6f4084472098.tar.gz
vdr-99321b371acd247bb41737df50af6f4084472098.tar.bz2
Fixed a possible crash when shutting down VDR while subtitles are being displayed
Diffstat (limited to 'device.c')
-rw-r--r--device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/device.c b/device.c
index 7ff24edd..a5afcfcc 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 3.2 2013/06/01 11:34:11 kls Exp $
+ * $Id: device.c 3.3 2013/08/22 10:28:55 kls Exp $
*/
#include "device.h"
@@ -118,6 +118,8 @@ cDevice::~cDevice()
DetachAllReceivers();
delete liveSubtitle;
delete dvbSubtitleConverter;
+ if (this == primaryDevice)
+ primaryDevice = NULL;
}
bool cDevice::WaitForAllDevicesReady(int Timeout)
@@ -362,7 +364,6 @@ void cDevice::SetCamSlot(cCamSlot *CamSlot)
void cDevice::Shutdown(void)
{
deviceHooks.Clear();
- primaryDevice = NULL;
for (int i = 0; i < numDevices; i++) {
delete device[i];
device[i] = NULL;