diff --git a/common/lc_library.cpp b/common/lc_library.cpp index ecfe142a..96e977dc 100644 --- a/common/lc_library.cpp +++ b/common/lc_library.cpp @@ -169,9 +169,9 @@ PieceInfo* lcPiecesLibrary::FindPiece(const char* PieceName, Project* CurrentPro PieceInfo* Info = PieceIt->second; bool HasModel = false; - if (lcGetActiveProject()) + if (CurrentProject) { - const std::vector>& Models = lcGetActiveProject()->GetModels(); + const std::vector>& Models = CurrentProject->GetModels(); HasModel = std::find_if(Models.begin(), Models.end(), [Model = Info->GetModel()](const std::unique_ptr& CheckModel) { return CheckModel.get() == Model; }) != Models.end(); }