Fixed crash loading files with invalid type 1 lines. Fixes #413.

This commit is contained in:
Leonardo Zide 2019-12-31 13:07:45 -08:00
parent 8309f0bf35
commit 1f441907ee

View file

@ -653,6 +653,10 @@ void lcModel::LoadLDraw(QIODevice& Device, Project* Project)
lcVector4(IncludeMatrix[5], IncludeMatrix[8], IncludeMatrix[11], 0.0f), lcVector4(IncludeMatrix[0], IncludeMatrix[1], IncludeMatrix[2], 1.0f));
QString PartId = LineStream.readAll().trimmed();
if (PartId.isEmpty())
continue;
QByteArray CleanId = PartId.toLatin1().toUpper().replace('\\', '/');
if (Library->IsPrimitive(CleanId.constData()))