Merge pull request #2450 from mlavik1/fbxexport_crashfix

Fix for crash in StreamWriter::PutString when exporting ASCII FBX
pull/2427/head
Kim Kulling 2019-05-10 18:51:57 +02:00 committed by GitHub
commit 2582ae53ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -253,7 +253,8 @@ void FBX::Node::DumpChildren(
} else {
std::ostringstream ss;
DumpChildrenAscii(ss, indent);
s.PutString(ss.str());
if (ss.tellp() > 0)
s.PutString(ss.str());
}
}
@ -267,7 +268,8 @@ void FBX::Node::End(
} else {
std::ostringstream ss;
EndAscii(ss, indent, has_children);
s.PutString(ss.str());
if (ss.tellp() > 0)
s.PutString(ss.str());
}
}