Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] [PATCH vdr-xine] Fix xine-lib segfault if vdr isn't running
The attached patch stops xine-lib from segfaulting if it can't talk to vdr
(e.g. if vdr isn't running).
--
| Darren Salt | d youmustbejoking,demon,co,uk | nr. Ashington,
| Debian, | s zap,tartarus,org | Northumberland
| RISC OS | @ | Toon Army
| I don't ask for much, just untold riches...
6 Number too big, 0:1
--- xine-lib/src/vdr/input_vdr.c~
+++ xine-lib/src/vdr/input_vdr.c
@@ -1341,11 +1341,14 @@
if (this->eventQueue)
xine_event_dispose_queue(this->eventQueue);
-
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("VDR: stopping control thread...\n"));
- pthread_cancel(this->threadControl);
- pthread_join(this->threadControl, NULL);
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("VDR: control thread terminated\n"));
+
+ if (this->threadControl)
+ {
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("VDR: stopping control thread...\n"));
+ pthread_cancel(this->threadControl);
+ pthread_join(this->threadControl, NULL);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("VDR: control thread terminated\n"));
+ }
if (this->fhResult != -1)
close(this->fhResult);
Home |
Main Index |
Thread Index