mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Fix a static-init issue on windows
This commit is contained in:
parent
e72e24a73d
commit
b3816055dc
@ -59,6 +59,7 @@ DAEToEggConverter() {
|
|||||||
_document = NULL;
|
_document = NULL;
|
||||||
_table = NULL;
|
_table = NULL;
|
||||||
_frame_rate = -1;
|
_frame_rate = -1;
|
||||||
|
_error_handler = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -79,6 +80,9 @@ DAEToEggConverter(const DAEToEggConverter ©) :
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
DAEToEggConverter::
|
DAEToEggConverter::
|
||||||
~DAEToEggConverter() {
|
~DAEToEggConverter() {
|
||||||
|
if (_error_handler != NULL) {
|
||||||
|
delete _error_handler;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -129,6 +133,9 @@ convert_file(const Filename &filename) {
|
|||||||
_vertex_pools.clear();
|
_vertex_pools.clear();
|
||||||
_skeletons.clear();
|
_skeletons.clear();
|
||||||
_frame_rate = -1;
|
_frame_rate = -1;
|
||||||
|
if (_error_handler == NULL) {
|
||||||
|
_error_handler = new FUErrorSimpleHandler;
|
||||||
|
}
|
||||||
|
|
||||||
// The default coordinate system is Y-up
|
// The default coordinate system is Y-up
|
||||||
if (_egg_data->get_coordinate_system() == CS_default) {
|
if (_egg_data->get_coordinate_system() == CS_default) {
|
||||||
@ -139,7 +146,7 @@ convert_file(const Filename &filename) {
|
|||||||
FCollada::Initialize();
|
FCollada::Initialize();
|
||||||
_document = FCollada::LoadDocument(filename.to_os_specific().c_str());
|
_document = FCollada::LoadDocument(filename.to_os_specific().c_str());
|
||||||
if (_document == NULL) {
|
if (_document == NULL) {
|
||||||
daeegg_cat.error() << "Failed to load document: " << _error_handler.GetErrorString() << endl;
|
daeegg_cat.error() << "Failed to load document: " << _error_handler->GetErrorString() << endl;
|
||||||
FCollada::Release();
|
FCollada::Release();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ private:
|
|||||||
|
|
||||||
PT(EggTable) _table;
|
PT(EggTable) _table;
|
||||||
FCDocument* _document;
|
FCDocument* _document;
|
||||||
FUErrorSimpleHandler _error_handler;
|
FUErrorSimpleHandler* _error_handler;
|
||||||
pmap<const string, PT(EggGroup)> _joints;
|
pmap<const string, PT(EggGroup)> _joints;
|
||||||
pmap<const string, PT(EggVertexPool)> _vertex_pools;
|
pmap<const string, PT(EggVertexPool)> _vertex_pools;
|
||||||
pvector<string> _skeletons;
|
pvector<string> _skeletons;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user