This defect is where a pointer is checked after it is
From: Erik Hovland <erik@hovland.org>
dereferenced.
---
mythtv/libs/libmythtv/NuppelVideoPlayer.cpp | 2 +-
mythtv/libs/libmythtv/tv_play.cpp | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
index e2223f4..282e718 100644
a
|
b
|
bool NuppelVideoPlayer::PrebufferEnoughFrames(void) |
2598 | 2598 | prebuffering_lock.unlock(); |
2599 | 2599 | |
2600 | 2600 | //VERBOSE(VB_PLAYBACK, LOC + "fs: " + videoOutput->GetFrameStatus()); |
2601 | | if (!videoOutput->EnoughPrebufferedFrames()) |
| 2601 | if (videoOutput && !videoOutput->EnoughPrebufferedFrames()) |
2602 | 2602 | { |
2603 | 2603 | VERBOSE(VB_GENERAL, LOC + "prebuffering pause"); |
2604 | 2604 | if (videoOutput) |
diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
index 0a80b3e..f0fa300 100644
a
|
b
|
bool TV::StartRecorder(RemoteEncoder *rec, int maxWait) |
1785 | 1785 | */ |
1786 | 1786 | bool TV::StartPlayer(bool isWatchingRecording, int maxWait) |
1787 | 1787 | { |
| 1788 | if (!nvp) |
| 1789 | { |
| 1790 | VERBOSE(VB_IMPORTANT, LOC_ERR + |
| 1791 | QString("StartPlayer(): NVP is NULL")); |
| 1792 | return false; |
| 1793 | } |
| 1794 | |
1788 | 1795 | SetupPlayer(isWatchingRecording); |
1789 | 1796 | if (pthread_create(&decode, NULL, SpawnDecode, nvp)) |
1790 | 1797 | return false; |
… |
… |
void TV::SwapPIP(void) |
4072 | 4079 | prbuffer->Unpause(); |
4073 | 4080 | StartPlayer(false); |
4074 | 4081 | activenvp = nvp; |
4075 | | nvp->FastForward(pip.frame/recorder->GetFrameRate()); |
| 4082 | if (nvp) |
| 4083 | nvp->FastForward(pip.frame/recorder->GetFrameRate()); |
4076 | 4084 | |
4077 | 4085 | // if we were muted before swapping PIP we need to restore it here |
4078 | 4086 | if (muted && nvp) |
… |
… |
void TV::BuildOSDTreeMenu(void) |
7525 | 7533 | FillMenuTracks(treeMenu, kTrackTypeTeletextCaptions); |
7526 | 7534 | } |
7527 | 7535 | |
7528 | | AspectOverrideMode aspectoverride = nvp->GetAspectOverride(); |
| 7536 | AspectOverrideMode aspectoverride = (nvp ? nvp->GetAspectOverride() : kAspect_Off); |
7529 | 7537 | OSDGenericTree *car_item = new OSDGenericTree( |
7530 | 7538 | treeMenu, tr("Change Aspect Ratio")); |
7531 | 7539 | for (int j = kAspect_Off; j < kAspect_END; j++) |
… |
… |
void TV::BuildOSDTreeMenu(void) |
7541 | 7549 | (sel) ? 1 : 0, NULL, "ASPECTGROUP"); |
7542 | 7550 | } |
7543 | 7551 | |
7544 | | AdjustFillMode adjustfill = nvp->GetAdjustFill(); |
| 7552 | AdjustFillMode adjustfill = (nvp ? nvp->GetAdjustFill() : kAdjustFill_Off); |
7545 | 7553 | OSDGenericTree *af_item = new OSDGenericTree(treeMenu, tr("Adjust Fill")); |
7546 | 7554 | for (int i = kAdjustFill_Off; i < kAdjustFill_END; i++) |
7547 | 7555 | { |