]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Objects/Object.cpp
This should fix the segfault from #89
[lugaru.git] / Source / Objects / Object.cpp
index a7d991d6907e1a81360f910ae199cfbc838d35f5..84cc17353b84b487274acd4a478ac33f60029f70 100644 (file)
@@ -636,6 +636,7 @@ void Object::Draw()
 void Object::DeleteObject(int which)
 {
     objects.erase(objects.begin() + which);
+    terrain.DeleteObject(which);
 }
 
 void Object::MakeObject(int atype, XYZ where, float ayaw, float apitch, float ascale)