Don't call PutString with an empty string. Both DumpChildrenAscii and EndAscii can return without modifyting the string, so we need to check the string before calling PutString. This used to cause a crash.
parent
9430696048
commit
6736f3d24b
|
@ -252,6 +252,7 @@ void FBX::Node::DumpChildren(
|
|||
} else {
|
||||
std::ostringstream ss;
|
||||
DumpChildrenAscii(ss, indent);
|
||||
if (ss.tellp() > 0)
|
||||
s.PutString(ss.str());
|
||||
}
|
||||
}
|
||||
|
@ -266,6 +267,7 @@ void FBX::Node::End(
|
|||
} else {
|
||||
std::ostringstream ss;
|
||||
EndAscii(ss, indent, has_children);
|
||||
if (ss.tellp() > 0)
|
||||
s.PutString(ss.str());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue