mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
protect against static init issues
This commit is contained in:
parent
2510631e5b
commit
7553c9d01a
@ -358,7 +358,7 @@ add_pipe_type(TypeHandle type, PipeConstructorFunc *func) {
|
|||||||
nassertr(func != NULL, false);
|
nassertr(func != NULL, false);
|
||||||
|
|
||||||
if (!type.is_derived_from(GraphicsPipe::get_class_type())) {
|
if (!type.is_derived_from(GraphicsPipe::get_class_type())) {
|
||||||
display_cat.warning()
|
display_cat->warning()
|
||||||
<< "Attempt to register " << type << " as a GraphicsPipe type.\n";
|
<< "Attempt to register " << type << " as a GraphicsPipe type.\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -370,15 +370,15 @@ add_pipe_type(TypeHandle type, PipeConstructorFunc *func) {
|
|||||||
for (ti = _pipe_types.begin(); ti != _pipe_types.end(); ++ti) {
|
for (ti = _pipe_types.begin(); ti != _pipe_types.end(); ++ti) {
|
||||||
const PipeType &ptype = (*ti);
|
const PipeType &ptype = (*ti);
|
||||||
if (ptype._type == type) {
|
if (ptype._type == type) {
|
||||||
display_cat.warning()
|
display_cat->warning()
|
||||||
<< "Attempt to register GraphicsPipe type " << type
|
<< "Attempt to register GraphicsPipe type " << type
|
||||||
<< " more than once.\n";
|
<< " more than once.\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (display_cat.is_debug()) {
|
if (display_cat->is_debug()) {
|
||||||
display_cat.debug()
|
display_cat->debug()
|
||||||
<< "Registering " << type << " as a GraphicsPipe type.\n";
|
<< "Registering " << type << " as a GraphicsPipe type.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user