summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2004-08-28 22:51:50 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2004-08-28 22:51:50 +0000
commit07be95eb3dc9d3a504df8d78a80c9136fbe2e866 (patch)
treef7a50e2cead3056fad23587784b1d7bdeb5de507
parenta2df0544eebb05b5be78fe6ce6358688d7df7de8 (diff)
downloadxine-lib-07be95eb3dc9d3a504df8d78a80c9136fbe2e866.tar.gz
xine-lib-07be95eb3dc9d3a504df8d78a80c9136fbe2e866.tar.bz2
Fix a crash when dispose it called before the DVD starts playing.
This needs to be fixed in libdvdnav as well. CVS patchset: 6916 CVS date: 2004/08/28 22:51:50
-rw-r--r--src/input/input_dvd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 076ba20f0..4ce0d4fcc 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_dvd.c,v 1.188 2004/08/28 15:06:26 jcdutton Exp $
+ * $Id: input_dvd.c,v 1.189 2004/08/28 22:51:50 jcdutton Exp $
*
*/
@@ -409,7 +409,8 @@ static void dvd_plugin_dispose (input_plugin_t *this_gen) {
xine_event_dispose_queue (this->event_queue);
((dvd_input_class_t *)this_gen->input_class)->ip = NULL;
- dvdnav_close(this->dvdnav);
+ if (this->dvdnav)
+ dvdnav_close(this->dvdnav);
pthread_mutex_lock(&this->buf_mutex);
if (this->mem_stack) {
@@ -420,7 +421,8 @@ static void dvd_plugin_dispose (input_plugin_t *this_gen) {
} else {
pthread_mutex_unlock(&this->buf_mutex);
pthread_mutex_destroy(&this->buf_mutex);
- free(this->mem);
+ if (this->mem)
+ free(this->mem);
free(this);
}
}