- Use obstacks for memory allocation for lispfiles and DrawingRequests,
[supertux.git] / src / object_factory.cpp
index 0b69169..4e40fd6 100644 (file)
@@ -48,6 +48,8 @@ GameObject* create_object(const std::string& name, const Vector& pos)
            << " (y " << pos.y << "))";
 
   lisp::Parser parser;
-  std::auto_ptr<lisp::Lisp> lisp (parser.parse(lisptext));
-  return create_object(name, *lisp);
+  const lisp::Lisp* lisp = parser.parse(lisptext, "create_object");
+  GameObject* object = create_object(name, *lisp);
+
+  return object;
 }