David Rose 16 years ago
parent
commit
170286140b
1 changed files with 4 additions and 7 deletions
  1. 4 7
      direct/src/plugin/p3dInstance.cxx

+ 4 - 7
direct/src/plugin/p3dInstance.cxx

@@ -264,14 +264,12 @@ P3DInstance::
     _panda_script_object = NULL;
     _panda_script_object = NULL;
   }
   }
 
 
-  nout << "Deleting downloads\n";
   Downloads::iterator di;
   Downloads::iterator di;
   for (di = _downloads.begin(); di != _downloads.end(); ++di) {
   for (di = _downloads.begin(); di != _downloads.end(); ++di) {
     P3DDownload *download = (*di).second;
     P3DDownload *download = (*di).second;
     p3d_unref_delete(download);
     p3d_unref_delete(download);
   }
   }
   _downloads.clear();
   _downloads.clear();
-  nout << "done deleting downloads\n";
 
 
   DESTROY_LOCK(_request_lock);
   DESTROY_LOCK(_request_lock);
 
 
@@ -354,16 +352,12 @@ cleanup() {
   _raw_requests.clear();
   _raw_requests.clear();
   RELEASE_LOCK(_request_lock);
   RELEASE_LOCK(_request_lock);
 
 
-  nout << this << " cleanup baked_requests\n";
   BakedRequests::iterator bi;
   BakedRequests::iterator bi;
   for (bi = _baked_requests.begin(); bi != _baked_requests.end(); ++bi) {
   for (bi = _baked_requests.begin(); bi != _baked_requests.end(); ++bi) {
     P3D_request *request = (*bi);
     P3D_request *request = (*bi);
-    nout << this << " cleanup in request " << request << " with " << request->_instance
-         << "\n";
     finish_request(request, false);
     finish_request(request, false);
   }
   }
   _baked_requests.clear();
   _baked_requests.clear();
-  nout << this << " done cleanup baked_requests\n";
 
 
   Downloads::iterator di;
   Downloads::iterator di;
   for (di = _downloads.begin(); di != _downloads.end(); ++di) {
   for (di = _downloads.begin(); di != _downloads.end(); ++di) {
@@ -831,7 +825,10 @@ finish_request(P3D_request *request, bool handled) {
   }
   }
 
 
   P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr();
   P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr();
-  assert(inst_mgr->validate_instance(request->_instance) != NULL);
+  if (inst_mgr->validate_instance(request->_instance) == NULL) {
+    nout << "Ignoring unknown request " << request << "\n";
+    return;
+  }
 
 
   switch (request->_request_type) {
   switch (request->_request_type) {
   case P3D_RT_stop:
   case P3D_RT_stop: