Crash fix. Fixes #648.

This commit is contained in:
Leonardo Zide 2021-03-10 16:10:24 -08:00
parent 5065dcac74
commit 44d0e92b50

View file

@ -238,7 +238,9 @@ void lcPartSelectionListModel::SetCurrentModelCategory()
lcModel* ActiveModel = gMainWindow->GetActiveModel();
lcPartsList PartsList;
ActiveModel->GetPartsList(gDefaultColor, true, true, PartsList);
if (ActiveModel)
ActiveModel->GetPartsList(gDefaultColor, true, true, PartsList);
for (const auto& PartIt : PartsList)
mParts.emplace_back(std::pair<PieceInfo*, QPixmap>((PieceInfo*)PartIt.first, QPixmap()));