fix firefox crash

This commit is contained in:
David Rose 2009-10-19 22:29:39 +00:00
parent 071cf37368
commit 10e4427860
2 changed files with 7 additions and 4 deletions

View File

@ -359,6 +359,12 @@ make_p3d_stream(const string &p3d_url) {
////////////////////////////////////////////////////////////////////
void P3DInstance::
set_p3d_filename(const string &p3d_filename) {
if (!_fparams.get_p3d_filename().empty()) {
nout << "p3d_filename already set to: " << _fparams.get_p3d_filename()
<< ", trying to set to " << p3d_filename << "\n";
return;
}
_fparams.set_p3d_filename(p3d_filename);
_got_fparams = true;

View File

@ -258,6 +258,7 @@ write_ready(NPStream *stream) {
// instance.
assert(_got_instance_url);
int user_id = P3D_instance_start_stream(_p3d_inst, _instance_url.c_str());
nout << "Got p3d instance to stream " << user_id << "\n";
req->_rtype = PPDownloadRequest::RT_user;
req->_user_id = user_id;
}
@ -1196,10 +1197,6 @@ create_instance() {
_script_object->set_main(main);
}
if (_got_instance_url) {
P3D_instance_start(_p3d_inst, false, _instance_url.c_str());
}
if (_got_window) {
send_window();
}