Couple of assertions
This commit is contained in:
@ -35,6 +35,7 @@ void Scene::update() {
|
||||
SceneItem * Scene::createSceneItem() {
|
||||
sceneitemid_t id = this->nextId++;
|
||||
auto item = new SceneItem(this, id);
|
||||
assertNotNull(item);
|
||||
this->itemsNotInitialized[id] = item;
|
||||
return item;
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ namespace Dawn {
|
||||
template<class T>
|
||||
T * addComponent() {
|
||||
auto component = new T(this);
|
||||
assertNotNull(component);
|
||||
this->components.push_back(component);
|
||||
return component;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using namespace Dawn;
|
||||
|
||||
SceneItemComponent::SceneItemComponent(SceneItem *item) {
|
||||
assertNotNull(item);
|
||||
this->item = item;
|
||||
this->transform = &item->transform;
|
||||
}
|
||||
|
Reference in New Issue
Block a user