mythfrontend can call a few functions that return null and then not check that
From: Erik Hovland <erik@hovland.org>
the pointer is null or not. This patch addresses those instances of this defect.
---
programs/mythfrontend/channelrecpriority.cpp | 5 ++++-
programs/mythfrontend/programrecpriority.cpp | 3 +++
programs/mythfrontend/viewscheduled.cpp | 3 +++
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/programs/mythfrontend/channelrecpriority.cpp b/programs/mythfrontend/channelrecpriority.cpp
index 3fbfe61..e56d053 100644
a
|
b
|
void ChannelRecPriority::updateBackground(void) |
230 | 230 | QPainter tmp(&bground); |
231 | 231 | |
232 | 232 | LayerSet *container = theme->GetSet("background"); |
233 | | container->Draw(&tmp, 0, 0); |
| 233 | if (!container) |
| 234 | return; |
| 235 | |
| 236 | container->Draw(&tmp, 0, 0); |
234 | 237 | |
235 | 238 | tmp.end(); |
236 | 239 | myBackground = bground; |
diff --git a/programs/mythfrontend/programrecpriority.cpp b/programs/mythfrontend/programrecpriority.cpp
index f6c99a2..244fdbd 100644
a
|
b
|
void ProgramRecPriority::updateBackground(void) |
391 | 391 | QPainter tmp(&bground); |
392 | 392 | |
393 | 393 | LayerSet *container = theme->GetSet("background"); |
| 394 | if (!container) |
| 395 | return; |
| 396 | |
394 | 397 | container->Draw(&tmp, 0, 0); |
395 | 398 | |
396 | 399 | tmp.end(); |
diff --git a/programs/mythfrontend/viewscheduled.cpp b/programs/mythfrontend/viewscheduled.cpp
index 9f8c913..9bb7628 100644
a
|
b
|
void ViewScheduled::updateBackground(void) |
239 | 239 | QPainter tmp(&bground); |
240 | 240 | |
241 | 241 | LayerSet *container = theme->GetSet("background"); |
| 242 | if (!container) |
| 243 | return; |
| 244 | |
242 | 245 | container->Draw(&tmp, 0, 0); |
243 | 246 | |
244 | 247 | tmp.end(); |