changeset 1364:8916502b398c

make sure thread pointer to be NULL if corresponding thread doesn't exist.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Wed, 25 Jul 2007 19:10:16 +0900
parents da987606127e
children 8702f72b3382
files src/cue/Makefile src/cue/cuesheet.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cue/Makefile	Wed Jul 25 18:53:09 2007 +0900
+++ b/src/cue/Makefile	Wed Jul 25 19:10:16 2007 +0900
@@ -9,7 +9,7 @@
 
 OBJECTS = ${SOURCES:.c=.o}
 
-CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(ARCH_DEFINES) -I../../intl -I../.. -Wall
+CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(ARCH_DEFINES) -I../../intl -I../.. -Wall -DDEBUG
 
 CXXFLAGS = $(CFLAGS)
 
--- a/src/cue/cuesheet.c	Wed Jul 25 18:53:09 2007 +0900
+++ b/src/cue/cuesheet.c	Wed Jul 25 19:10:16 2007 +0900
@@ -54,9 +54,9 @@
 static void cue_cleanup(void);
 static gpointer watchdog_func(gpointer data);
 
-GThread *watchdog_thread;
-GThread *play_thread;
-GThread *real_play_thread;
+static GThread *watchdog_thread = NULL;
+static GThread *play_thread = NULL;
+static GThread *real_play_thread = NULL;
 
 static GMutex *cue_mutex;
 static GCond *cue_cond;
@@ -342,6 +342,8 @@
 #ifdef DEBUG
             g_print("i: stop(real_ip) finished\n");
 #endif
+            real_play_thread = NULL;
+
             if (data != NULL)
                 data->playing = 0;
             if (caller_ip != NULL)