mirror of
https://github.com/panda3d/panda3d.git
synced 2026-03-13 13:08:59 -05:00
fix firefox crash on osx
This commit is contained in:
@@ -738,6 +738,10 @@ start_p3dpython() {
|
||||
env += _python_root_dir;
|
||||
env += '\0';
|
||||
|
||||
env += "PYTHONHOME=";
|
||||
env += _python_root_dir;
|
||||
env += '\0';
|
||||
|
||||
env += "PRC_DIR=";
|
||||
env += _python_root_dir;
|
||||
env += '\0';
|
||||
@@ -746,6 +750,7 @@ start_p3dpython() {
|
||||
env += _python_root_dir;
|
||||
env += '\0';
|
||||
|
||||
nout << "Attempting to start python from " << p3dpython << "\n";
|
||||
#ifdef _WIN32
|
||||
_p3dpython_handle = win_create_process
|
||||
(p3dpython, _python_root_dir, env, _output_filename,
|
||||
|
||||
@@ -246,6 +246,18 @@ eval(const string &expression) const {
|
||||
return object;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PPBrowserObject::clear_class_definition
|
||||
// Access: Public, Static
|
||||
// Description: Should be called when the core API is unloaded, and
|
||||
// the associated class definition object is therefore
|
||||
// invalidated.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PPBrowserObject::
|
||||
clear_class_definition() {
|
||||
_browser_object_class = NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PPBrowserObject::get_class_definition
|
||||
// Access: Private, Static
|
||||
|
||||
@@ -43,6 +43,8 @@ public:
|
||||
P3D_object *params[], int num_params) const;
|
||||
P3D_object *eval(const string &expression) const;
|
||||
|
||||
static void clear_class_definition();
|
||||
|
||||
private:
|
||||
static P3D_class_definition *get_class_definition();
|
||||
|
||||
|
||||
@@ -932,6 +932,7 @@ do_load_plugin() {
|
||||
}
|
||||
#endif // P3D_PLUGIN_P3D_PLUGIN
|
||||
|
||||
nout << "Attempting to load core API from " << pathname << "\n";
|
||||
if (!load_plugin(pathname, "", "", "")) {
|
||||
nout << "Unable to launch core API in " << pathname << "\n";
|
||||
return;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "startup.h"
|
||||
#include "p3d_plugin_config.h"
|
||||
#include "p3d_lock.h"
|
||||
#include "ppBrowserObject.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
@@ -183,6 +184,7 @@ NPError OSCALL
|
||||
NP_Shutdown(void) {
|
||||
nout << "shutdown\n";
|
||||
unload_plugin();
|
||||
PPBrowserObject::clear_class_definition();
|
||||
|
||||
// Not clear whether there's a return value or not. Some versions
|
||||
// of the API have different opinions on this.
|
||||
|
||||
Reference in New Issue
Block a user