Ticket #7171: programs_mythbackend-pointer-checks

File programs_mythbackend-pointer-checks, 917 bytes (added by Erik Hovland <erik@…>, 11 years ago)

Check pointers in mythbackend

Line 
1Make sure pointers are OK.
2
3From: Erik Hovland <erik@hovland.org>
4
5
6---
7
8 mythtv/programs/mythbackend/mainserver.cpp |   10 ++++++----
9 1 files changed, 6 insertions(+), 4 deletions(-)
10
11
12diff --git a/mythtv/programs/mythbackend/mainserver.cpp b/mythtv/programs/mythbackend/mainserver.cpp
13index 52b1059..f8640cb 100644
14--- a/mythtv/programs/mythbackend/mainserver.cpp
15+++ b/mythtv/programs/mythbackend/mainserver.cpp
16@@ -2242,11 +2242,13 @@ void MainServer::HandleDeleteRecording(QString &chanid, QString &starttime,
17 
18         SendResponse(pbssock, outputlist);
19     }
20+    else
21+    {
22+        RecordingInfo ri(*pginfo);
23+        delete pginfo;
24 
25-    RecordingInfo ri(*pginfo);
26-    delete pginfo;
27-
28-    DoHandleDeleteRecording(ri, pbs, forceMetadataDelete);
29+        DoHandleDeleteRecording(ri, pbs, forceMetadataDelete);
30+    }
31 }
32 
33 void MainServer::HandleDeleteRecording(QStringList &slist, PlaybackSock *pbs,