Don't crash render thread even if there is no world
This commit is contained in:
parent
a2b107f53f
commit
03b2fa65fb
1 changed files with 5 additions and 3 deletions
|
|
@ -67,9 +67,11 @@ Destroy the opengl context and the related resources."
|
|||
do (render-scene-node child scene)))
|
||||
|
||||
(defun render-world (world)
|
||||
(with-lock-held ((scene-lock world))
|
||||
(with-accessors ((scene world-scene)) world
|
||||
(render-scene-node (root-node scene) scene))))
|
||||
(unless (null world)
|
||||
(with-lock-held ((scene-lock world))
|
||||
(with-accessors ((scene world-scene)) world
|
||||
(unless (null scene)
|
||||
(render-scene-node (root-node scene) scene))))))
|
||||
|
||||
(defmethod thread-initialize ((thread render-thread))
|
||||
(format t "Initialize ~a~%" (name thread))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue