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

This commit is contained in:
Chris Brunner 2010-09-23 20:52:28 +00:00
parent a1580db8ff
commit f05c2199c1

View File

@ -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