diff --git a/direct/src/plugin_activex/PPInstance.cpp b/direct/src/plugin_activex/PPInstance.cpp index 8d19df2017..189cfeaed0 100644 --- a/direct/src/plugin_activex/PPInstance.cpp +++ b/direct/src/plugin_activex/PPInstance.cpp @@ -417,7 +417,10 @@ int PPInstance::DownloadP3DComponents( std::string& p3dDllFilename ) } } } - + + if (error) { + set_failed(); + } return error; } @@ -448,7 +451,6 @@ int PPInstance::LoadPlugin( const std::string& dllFilename ) nout << "Attempting to load core API from " << pathname << "\n"; if (!load_plugin(pathname, "", "", true, "", "", "", false, false, nout)) { nout << "Unable to launch core API in " << pathname << "\n"; - set_failed(); error = 1; } else { #ifdef PANDA_OFFICIAL_VERSION @@ -464,6 +466,9 @@ int PPInstance::LoadPlugin( const std::string& dllFilename ) } } + if (error) { + set_failed(); + } return error ; } diff --git a/direct/src/plugin_npapi/ppInstance.cxx b/direct/src/plugin_npapi/ppInstance.cxx index 7c59e17405..5e5522ff2a 100644 --- a/direct/src/plugin_npapi/ppInstance.cxx +++ b/direct/src/plugin_npapi/ppInstance.cxx @@ -480,7 +480,7 @@ url_notify(const char *url, NPReason reason, void *notifyData) { string contents_filename = _root_dir + "/contents.xml"; if (!read_contents_file(contents_filename)) { nout << "Unable to read contents file " << contents_filename << "\n"; - // TODO: fail + set_failed(); } } } @@ -1107,7 +1107,7 @@ downloaded_file(PPDownloadRequest *req, const string &filename) { string contents_filename = _root_dir + "/contents.xml"; if (!read_contents_file(contents_filename)) { nout << "Unable to read contents file " << contents_filename << "\n"; - // TODO: fail + set_failed(); } } break; @@ -1231,7 +1231,7 @@ downloaded_plugin(const string &filename) { return; } - // TODO: fail + set_failed(); return; } @@ -1239,12 +1239,13 @@ downloaded_plugin(const string &filename) { string pathname = _core_api_dll.get_pathname(_root_dir); if (!copy_file(filename, pathname)) { nout << "Couldn't copy " << pathname << "\n"; + set_failed(); return; } if (!_core_api_dll.quick_verify(_root_dir)) { nout << "After copying, " << pathname << " is no good.\n"; - // TODO: fail + set_failed(); return; }