Merge pull request #9270 from sethalves/fix-up-vhacd-cl-util

fix a crash and a memory leak in vhacd-util
This commit is contained in:
Brad Hefta-Gaub 2016-12-24 14:52:12 -08:00 committed by GitHub
commit 03c053b7e9
2 changed files with 5 additions and 1 deletions

View file

@ -101,7 +101,10 @@ private:
};
inline void traceEvent(const QLoggingCategory& category, const QString& name, EventType type, const QString& id = "", const QVariantMap& args = {}, const QVariantMap& extra = {}) {
DependencyManager::get<Tracer>()->traceEvent(category, name, type, id, args, extra);
const auto& tracer = DependencyManager::get<Tracer>();
if (tracer) {
tracer->traceEvent(category, name, type, id, args, extra);
}
}
inline void traceEvent(const QLoggingCategory& category, const QString& name, EventType type, int id, const QVariantMap& args = {}, const QVariantMap& extra = {}) {

View file

@ -51,6 +51,7 @@ bool vhacd::VHACDUtil::loadFBX(const QString filename, FBXGeometry& result) {
return false;
}
result = *geom;
delete geom;
reSortFBXGeometryMeshes(result);
} catch (const QString& error) {