[mythtv] Segfault when auto-expiring...
Richard Ayres
richard at bettercode.com
Mon Jul 21 15:47:53 EDT 2003
Hi all,
Found an 'issue'. Well, for some reason, we had a show in the database
which didn't exist as a file for several months and we completely forgot
about it - it didn't cause a problem. Anyway, when the CVS version with the
cool expiry stuff came down the first thing it wanted to expire was this
show. Problem was it segfaulted in MainServer::customEvent().
GetProgramFromRecorded() returned NULL and this was passed into
DoHandleDeleteRecording() without checking.
Here's a minor patch, for the sake of completeness:
--BEGIN--
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/mainserver.cpp,v
retrieving revision 1.67
diff -u -r1.67 mainserver.cpp
--- programs/mythbackend/mainserver.cpp 18 Jul 2003 20:10:58 -0000 1.67
+++ programs/mythbackend/mainserver.cpp 21 Jul 2003 10:25:46 -0000
@@ -328,7 +328,16 @@
tokens[1],
startts);
dblock.unlock();
- DoHandleDeleteRecording(pinfo, NULL);
+ if (pinfo != NULL)
+ {
+ DoHandleDeleteRecording(pinfo, NULL);
+ }
+ else
+ {
+ cerr << "Cannot find program info for '" << me->Message() + <<
"', whilst attempting AUTO_EXPIRE" << endl;
+ };
+
return;
}
--END--
stitch
More information about the mythtv-dev
mailing list