summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-02-12 15:45:59 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-02-12 15:45:59 +0100
commit1e74f596b238358fe0b348208d4ef714ce5dd9f2 (patch)
treedc5f7b77ca5f17747eda8a64351376072790245b /device.c
parentcace8bed8d05444168ab82d0042f6ac5193befb4 (diff)
downloadvdr-1e74f596b238358fe0b348208d4ef714ce5dd9f2.tar.gz
vdr-1e74f596b238358fe0b348208d4ef714ce5dd9f2.tar.bz2
Fixed a possible crash when canceling VDR while displaying subtitles, and the primary device is no longer available
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 714668db..5ffc28d1 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 2.46 2012/01/18 10:43:00 kls Exp $
+ * $Id: device.c 2.47 2012/02/12 15:44:06 kls Exp $
*/
#include "device.h"
@@ -41,7 +41,8 @@ cLiveSubtitle::~cLiveSubtitle()
void cLiveSubtitle::Receive(uchar *Data, int Length)
{
- cDevice::PrimaryDevice()->PlayTs(Data, Length);
+ if (cDevice::PrimaryDevice())
+ cDevice::PrimaryDevice()->PlayTs(Data, Length);
}
// --- cDeviceHook -----------------------------------------------------------