Skip to content

Commit

Permalink
Fix Coverity 1025910, 1025904, and 1025903.
Browse files Browse the repository at this point in the history
  • Loading branch information
stichnot committed May 30, 2013
1 parent 181e063 commit 6ab96bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 6ab96bd

Please sign in to comment.