diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-29 15:24:39 +0300 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-29 15:24:39 +0300 |
| commit | 68c9d1e1fca93852fd20465456de41141afc03b6 (patch) | |
| tree | ba8bb2bc6d0098c6a2a1fd6f24c23c3fe0768fca | |
| parent | acc0eb1627126014f0cf0861348cf456d329577b (diff) | |
| download | vdr-plugin-osdteletext-68c9d1e1fca93852fd20465456de41141afc03b6.tar.gz vdr-plugin-osdteletext-68c9d1e1fca93852fd20465456de41141afc03b6.tar.bz2 | |
Use DELETENULL.
| -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); } } } |
