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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-10 10:00:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-10 10:03:00 +0300
commit96bae0f882034a1e0496261df2c3254d1ca13083 (patch)
tree9af07e7d60b28f9b391df535185a69cf5f65dda9 /source
parentab14da272d8252eb20dc5f5285cf3d5d2e683216 (diff)
Fix T55879: Crash setting render presets
Any RNA using 'rna_SceneCamera_update' crashed when set from Python.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 5b7377eed17..6b312634b50 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1842,8 +1842,9 @@ static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
Scene *scene = (Scene *)ptr->id.data;
Object *camera = scene->camera;
- if (camera)
- DEG_id_tag_update(&camera->id, 0);
+ if (camera && (camera->type == OB_CAMERA)) {
+ DEG_id_tag_update(&camera->id, OB_RECALC_DATA);
+ }
}
static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))