mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-19 13:15:00 -04:00
fix LightTransition
This commit is contained in:
parent
2c9a5fdc72
commit
3ceb686cd7
@ -205,7 +205,21 @@ define_extension_type(CPPExtensionType *type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type->is_template()) {
|
if (type->is_template()) {
|
||||||
|
pair<Templates::iterator, bool> result =
|
||||||
_templates.insert(Templates::value_type(name, type));
|
_templates.insert(Templates::value_type(name, type));
|
||||||
|
|
||||||
|
if (!result.second) {
|
||||||
|
// The template was not inserted because we already had a
|
||||||
|
// template definition with the given name. If the previous
|
||||||
|
// definition was incomplete, replace it.
|
||||||
|
CPPDeclaration *old_templ = (*result.first).second;
|
||||||
|
CPPType *old_templ_type = old_templ->as_type();
|
||||||
|
if (old_templ_type == NULL || old_templ_type->is_incomplete()) {
|
||||||
|
// The previous template definition was incomplete, maybe a
|
||||||
|
// forward reference; replace it with the good one.
|
||||||
|
(*result.first).second = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user