mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
fix obscure firefox crash
This commit is contained in:
parent
884c389bad
commit
3977a68842
@ -57,11 +57,19 @@ PPInstance(NPMIMEType pluginType, NPP instance, uint16 mode,
|
|||||||
// Copy the tokens and save them within this object.
|
// Copy the tokens and save them within this object.
|
||||||
_tokens.reserve(argc);
|
_tokens.reserve(argc);
|
||||||
for (int i = 0; i < argc; ++i) {
|
for (int i = 0; i < argc; ++i) {
|
||||||
|
if (argn[i] != NULL) {
|
||||||
|
const char *v = argv[i];
|
||||||
|
if (v == NULL) {
|
||||||
|
// Firefox might give us a NULL argv[i] in some cases.
|
||||||
|
v = "";
|
||||||
|
}
|
||||||
|
|
||||||
P3D_token token;
|
P3D_token token;
|
||||||
token._keyword = strdup(argn[i]);
|
token._keyword = strdup(argn[i]);
|
||||||
token._value = strdup(argv[i]);
|
token._value = strdup(v);
|
||||||
_tokens.push_back(token);
|
_tokens.push_back(token);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_root_dir = global_root_dir;
|
_root_dir = global_root_dir;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user