Permalink
Browse files

Fix Coverity 1025910, 1025904, and 1025903.

  • Loading branch information...
stichnot committed May 30, 2013
1 parent 181e063 commit 6ab96bd710d4ac230558975d2fd6f3ea68a9d44a
Showing with 5 additions and 3 deletions.
  1. +5 −3 mythtv/libs/libmythtv/mythplayer.cpp
@@ -889,7 +889,7 @@ void MythPlayer::CreateDecoder(char *testbuf, int testreadsize)
int MythPlayer::OpenFile(uint retries)
{
// Disable hardware acceleration for second PBP
if ((player_ctx->IsPBP() && !player_ctx->IsPrimaryPBP()) &&
if (player_ctx && (player_ctx->IsPBP() && !player_ctx->IsPrimaryPBP()) &&
FlagIsSet(kDecodeAllowGPU))
{
playerFlags = (PlayerFlags)(playerFlags - kDecodeAllowGPU);
@@ -2522,7 +2522,8 @@ void MythPlayer::SwitchToProgram(void)
{
// Restore original ringbuffer
ICRingBuffer *ic = dynamic_cast< ICRingBuffer* >(player_ctx->buffer);
player_ctx->buffer = ic->Take();
if (ic) // should always be true
player_ctx->buffer = ic->Take();
delete ic;
}
@@ -2664,7 +2665,8 @@ void MythPlayer::JumpToProgram(void)
{
// Restore original ringbuffer
ICRingBuffer *ic = dynamic_cast< ICRingBuffer* >(player_ctx->buffer);
player_ctx->buffer = ic->Take();
if (ic) // should always be true
player_ctx->buffer = ic->Take();
delete ic;
}

0 comments on commit 6ab96bd

Please sign in to comment.