summaryrefslogtreecommitdiffstats
path: root/src/entities/Building.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/entities/Building.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/entities/Building.cpp b/src/entities/Building.cpp
index aad2d402..3c096636 100644
--- a/src/entities/Building.cpp
+++ b/src/entities/Building.cpp
@@ -12,7 +12,7 @@ CBuilding::ReplaceWithNewModel(int32 id)
{
DeleteRwObject();
- if(CModelInfo::GetModelInfo(m_modelIndex)->m_refCount == 0)
+ if (CModelInfo::GetModelInfo(m_modelIndex)->GetNumRefs() == 0)
CStreaming::RemoveModel(m_modelIndex);
m_modelIndex = id;