Fix crash of standalone app after recent refactor
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 31 Oct 2017 11:46:38 +0000 (12:46 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 31 Oct 2017 12:34:23 +0000 (13:34 +0100)
intern/cycles/app/cycles_standalone.cpp

index 939c6cf7eb515b382959e600e120236e406cffec..0b9a4042e0e3e7d526da25fece182d0520e668fd 100644 (file)
@@ -130,11 +130,11 @@ static void session_init()
                options.session->progress.set_update_callback(function_bind(&view_redraw));
 #endif
 
-       options.session->start();
-
        /* load scene */
        scene_init();
        options.session->scene = options.scene;
+
+       options.session->start();
 }
 
 static void session_exit()
@@ -143,10 +143,6 @@ static void session_exit()
                delete options.session;
                options.session = NULL;
        }
-       if(options.scene) {
-               delete options.scene;
-               options.scene = NULL;
-       }
 
        if(options.session_params.background && !options.quiet) {
                session_print("Finished Rendering.");