fix splash window when crash at startup

This commit is contained in:
David Rose 2009-12-08 00:26:42 +00:00
parent 86c892d3e8
commit 3f2f1f4877
2 changed files with 5 additions and 2 deletions

View File

@ -55,6 +55,7 @@ PPInstance(NPMIMEType pluginType, NPP instance, uint16_t mode,
_npp_mode = mode;
_script_object = NULL;
_failed = false;
_started = false;
// Copy the tokens and save them within this object.
_tokens.reserve(argc);
@ -287,7 +288,7 @@ stop_outstanding_streams() {
streams.swap(_streams);
for (si = streams.begin(); si != streams.end(); ++si) {
NPStream *stream = (*si);
nout << "Stopping stream " << stream->url << "\n";
nout << "Stopping stream " << (void *)stream << "\n";
browser->destroystream(_npp_instance, stream, NPRES_USER_BREAK);
}
@ -1303,7 +1304,7 @@ do_load_plugin() {
////////////////////////////////////////////////////////////////////
void PPInstance::
create_instance() {
if (_p3d_inst != NULL) {
if (_started) {
// Already created.
return;
}
@ -1317,6 +1318,7 @@ create_instance() {
if (!_tokens.empty()) {
tokens = &_tokens[0];
}
_started = true;
_p3d_inst = P3D_new_instance(request_ready, tokens, _tokens.size(),
0, NULL, this);

View File

@ -117,6 +117,7 @@ private:
FileSpec _core_api_dll;
bool _failed;
bool _started;
bool _got_instance_url;
string _instance_url;