diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-05-07 03:52:08 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-05-07 03:52:31 +0400 |
commit | 02b1dbef8cff6427bae9dc9e0da6d502a07d035c (patch) | |
tree | 21affc32a38675a1c9c307d9bd547c5fb2078754 /source/blender/editors/uvedit | |
parent | d653c70ee65856d74aaa1712b52b51b62e7c527c (diff) |
Fix T39653 crash on drawing modified UVs
Just a case of uninitialized material array.
Make sure object materials are initialized properly when drawing UVs.
This might look strange since we do not really need materials here.
However, the same GPU object may be used in a 3D viewport and if we try
to avoid initializing the materials somehow this will break.
Also, this breaks on full screen UV editor as is apparent from this
report.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 2291418932b..ce4b97e7108 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -485,6 +485,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) /* 1. draw shadow mesh */ if (sima->flag & SI_DRAWSHADOW) { + DM_update_materials(em->derivedFinal, obedit); /* first try existing derivedmesh */ if (!draw_uvs_dm_shadow(em->derivedFinal)) { /* create one if it does not exist */ |