Browse Source

Fix Cg crash at shutdown when multithreaded pipeline is active

rdb 10 years ago
parent
commit
6a263746cd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      panda/src/display/graphicsStateGuardian.cxx

+ 2 - 1
panda/src/display/graphicsStateGuardian.cxx

@@ -2980,7 +2980,6 @@ close_gsg() {
     display_cat.debug()
       << this << " close_gsg " << get_type() << "\n";
   }
-  free_pointers();
 
   // As tempting as it may be to try to release all the textures and
   // geoms now, we can't, because we might not be the currently-active
@@ -3005,6 +3004,8 @@ close_gsg() {
 #ifdef DO_PSTATS
   _pending_timer_queries.clear();
 #endif
+
+  free_pointers();
 }
 
 ////////////////////////////////////////////////////////////////////