First object in Scene objects list is pointed to by scene->objects

This commit is contained in:
Eryn Wells 2013-09-07 21:39:02 -07:00
parent 4e3092eecc
commit 830979fc75

View file

@ -128,6 +128,11 @@ scene_add_object(Scene *scene, Object *obj)
ol->object = obj;
ol->next = NULL;
if (scene->objects == NULL) {
scene->objects = ol;
return;
}
ObjectList *ptr = scene->objects;
while (ptr != NULL) {
if (ptr->next == NULL) {