First object in Scene objects list is pointed to by scene->objects
This commit is contained in:
parent
4e3092eecc
commit
830979fc75
1 changed files with 5 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue