Browse Source

moving declaration of inst_mgr up a few lines in start_download to before where it's needed

Chris Brunner 15 years ago
parent
commit
f05c2199c1
1 changed files with 3 additions and 4 deletions
  1. 3 4
      direct/src/plugin/p3dPackage.cxx

+ 3 - 4
direct/src/plugin/p3dPackage.cxx

@@ -1258,8 +1258,9 @@ start_download(P3DPackage::DownloadType dtype, const string &urlbase,
                const string &pathname, const FileSpec &file_spec) {
   // Only one download should be active at a time
   assert(_active_download == NULL);
-  // This can't happen! If verify_contents is set to P3D_VC_never,
-  // we're not allowed to download anything, so we shouldn't get here.
+  // This can't happen! If verify_contents is set to P3D_VC_never, we're
+  // not allowed to download anything, so we shouldn't get here
+  P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr();
   assert(inst_mgr->get_verify_contents() != P3D_VC_never);
 
   // We can't explicitly support partial downloads here, because
@@ -1309,8 +1310,6 @@ start_download(P3DPackage::DownloadType dtype, const string &urlbase,
     }
   }
 
-  P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr();
-
   if (dtype == DT_redownload_contents_file) {
     // When we're redownloading the contents file after a download
     // error, we always go straight to the authoritative host, not