]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/watchbsp.cpp
Merge commit '173f350be76237a7dee9c00c389dff4e56b3da4c' into garux-merge
[xonotic/netradiant.git] / radiant / watchbsp.cpp
index bbae3fab77af86854c191e8d4656fd249961213e..118d37f47ab950e98812c74b2b44599103d9e00f 100644 (file)
@@ -211,6 +211,7 @@ void BuildMonitor_Construct(){
 
 void BuildMonitor_Destroy(){
        delete g_pWatchBSP;
+       g_pWatchBSP = NULL;
 }
 
 CWatchBSP *GetWatchBSP(){
@@ -469,7 +470,7 @@ static xmlSAXHandler saxParser = {
 // ------------------------------------------------------------------------------------------------
 
 
-guint s_routine_id;
+guint s_routine_id = 0;
 static gint watchbsp_routine( gpointer data ){
        reinterpret_cast<CWatchBSP*>( data )->RoutineProcessing();
        return TRUE;
@@ -489,8 +490,9 @@ void CWatchBSP::Reset(){
                m_xmlInputBuffer = NULL;
        }
        m_eState = EIdle;
-       if ( s_routine_id ) {
+       if ( s_routine_id != 0 ) {
                g_source_remove( s_routine_id );
+               s_routine_id = 0;
        }
 }