diff options
-rw-r--r-- | display.c | 9 | ||||
-rw-r--r-- | display.h | 2 | ||||
-rw-r--r-- | txtrecv.c | 6 |
3 files changed, 6 insertions, 11 deletions
@@ -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; } } @@ -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 @@ -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); } } } |