Fix for DVB subtitles crash at exit (with plugin primary device)
Commit Message
Here's a patch for the subtitles plugin that fixes a crash when shutting
down VDR. Patch already sent upstream.
The crash can probably occur only when the primary device is implemented
by a plugin which has already been shut down before the DVB subtitles
plugin.
@@ -24,7 +24,9 @@
int64_t cStcSynchronizer::GetSTC(bool fix)
{
- int64_t stc = cDevice::PrimaryDevice()->GetSTC();
+ int64_t stc = -1;
+ if (cDevice *pd = cDevice::PrimaryDevice())
+ stc = pd->GetSTC();
// add the 33rd bit if required
if (fix)