Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-09 22:05:53 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-09 22:05:53 +0400
commit28add50083204e99121c5290242652ccd3fcca9e (patch)
treef38390dbd6200b0ae84b5cc041718815168f9046 /intern/cycles/blender/blender_sync.cpp
parent860fce4eb97e4961065afad76f7b0915600b1ddb (diff)
Fix #35696: cycles crash with no world assigned to scene, after recent changes.
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r--intern/cycles/blender/blender_sync.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index ef9ce85ddf8..72ed1b84915 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -211,7 +211,6 @@ void BlenderSync::sync_integrator()
void BlenderSync::sync_film()
{
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
- BL::WorldMistSettings b_mist = b_scene.world().mist_settings();
Film *film = scene->film;
Film prevfilm = *film;
@@ -220,19 +219,23 @@ void BlenderSync::sync_film()
film->filter_type = (FilterType)RNA_enum_get(&cscene, "filter_type");
film->filter_width = (film->filter_type == FILTER_BOX)? 1.0f: get_float(cscene, "filter_width");
- film->mist_start = b_mist.start();
- film->mist_depth = b_mist.depth();
-
- switch(b_mist.falloff()) {
- case BL::WorldMistSettings::falloff_QUADRATIC:
- film->mist_falloff = 2.0f;
- break;
- case BL::WorldMistSettings::falloff_LINEAR:
- film->mist_falloff = 1.0f;
- break;
- case BL::WorldMistSettings::falloff_INVERSE_QUADRATIC:
- film->mist_falloff = 0.5f;
- break;
+ if(b_scene.world()) {
+ BL::WorldMistSettings b_mist = b_scene.world().mist_settings();
+
+ film->mist_start = b_mist.start();
+ film->mist_depth = b_mist.depth();
+
+ switch(b_mist.falloff()) {
+ case BL::WorldMistSettings::falloff_QUADRATIC:
+ film->mist_falloff = 2.0f;
+ break;
+ case BL::WorldMistSettings::falloff_LINEAR:
+ film->mist_falloff = 1.0f;
+ break;
+ case BL::WorldMistSettings::falloff_INVERSE_QUADRATIC:
+ film->mist_falloff = 0.5f;
+ break;
+ }
}
if(film->modified(prevfilm))