bugfix: [#34220] Blenderplayer no longer working after r54395 commit [segfault due...
authorDalai Felinto <dfelinto@gmail.com>
Wed, 13 Feb 2013 23:09:12 +0000 (23:09 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 13 Feb 2013 23:09:12 +0000 (23:09 +0000)
patch by Sergey Sharybin

note, I still find strange that world was valid and now it is not, but at least we no longer segfaults

source/blender/blenloader/intern/readfile.c

index 6fba30aa06084626a864afa05cd00f7c6849db17..94dfb0cf39948fc3de0b8eaf1e0a1007e1c8ac99 100644 (file)
@@ -8664,7 +8664,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                        if (scene->world) {
                                World *world = blo_do_versions_newlibadr(fd, scene->id.lib, scene->world);
 
-                               if (is_zero_v3(&world->horr)) {
+                               if (world && is_zero_v3(&world->horr)) {
                                        if ((world->skytype & WO_SKYBLEND) == 0 || is_zero_v3(&world->zenr)) {
                                                set_premul = true;
                                        }