summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--display.c9
-rw-r--r--display.h2
-rw-r--r--txtrecv.c6
3 files changed, 6 insertions, 11 deletions
diff --git a/display.c b/display.c
index 8d6b49c..75b3596 100644
--- a/display.c
+++ b/display.c
@@ -102,8 +102,7 @@ cDisplay2BPP::cDisplay2BPP(int x0, int y0, int width, int height)
tArea Areas[] = { { 0, 0, width - 1, height - 1, 2 } };
if (osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) != oeOk) {
- delete osd;
- osd=NULL;
+ DELETENULL(osd);
return;
}
osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
@@ -161,8 +160,7 @@ cDisplay4BPP::cDisplay4BPP(int x0, int y0, int width, int height)
tArea Areas[] = { { 0, 0, width - 1, height - 1, 4 } };
if (osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) != oeOk) {
- delete osd;
- osd=NULL;
+ DELETENULL(osd);
return;
}
osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
@@ -206,8 +204,7 @@ void cDisplay4BPPHalf::InitOSD() {
}
if (Areas[0].y1>Areas[0].y2) {
// Area is empty, fail miserably
- delete osd;
- osd=NULL;
+ DELETENULL(osd);
return;
}
}
diff --git a/display.h b/display.h
index 37c76c2..0f8aa31 100644
--- a/display.h
+++ b/display.h
@@ -35,7 +35,7 @@ namespace Display {
// Access to display mode:
void SetMode(Display::Mode mode);
inline void Delete()
- { if (display) { delete display; display=NULL; } }
+ { if (display) { DELETENULL(display); } }
void ShowUpperHalf();
// Make sure the upper half of screen is visible
diff --git a/txtrecv.c b/txtrecv.c
index a3448be..5acf2c8 100644
--- a/txtrecv.c
+++ b/txtrecv.c
@@ -499,8 +499,7 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber)
// live channel was changed
// now re-attach the receiver to the new live channel
- delete receiver;
- receiver = NULL;
+ DELETENULL(receiver);
int TPid = newLiveChannel->Tpid();
@@ -596,8 +595,7 @@ void cTxtReceiver::SaveAndDeleteTxtPage()
if (TxtPage) {
if (storeTopText || !TxtPage->IsTopTextPage()) {
TxtPage->save();
- delete TxtPage;
- TxtPage=NULL;
+ DELETENULL(TxtPage);
}
}
}