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:
authorFalk David <falkdavid@gmx.de>2021-02-15 22:08:42 +0300
committerFalk David <falkdavid@gmx.de>2021-02-15 22:10:46 +0300
commit3e55d7d60542bd00fe0a200da66d99582cc387e0 (patch)
tree5b13fe6186981aacdda2179d6d136f889ed60bd9 /source
parent9cccbbebaa3f03aa5137bd54f991f2cd824a3977 (diff)
Fix T85499: Crash on switching to edit mode with uv editor open
A fix for T83187 (rBf83aa830) assumed in the overlay code of the uv editor that the object was a mesh when it did not have to be - causing a crash. The fix makes sure that the object is a mesh. Reviewed By: jbakker, campbellbarton Maniphest Tasks: T85499, T85495 Differential Revision: https://developer.blender.org/D10369
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/overlay/overlay_edit_uv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.c b/source/blender/draw/engines/overlay/overlay_edit_uv.c
index 22433905b75..336b03ee284 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_uv.c
+++ b/source/blender/draw/engines/overlay/overlay_edit_uv.c
@@ -401,7 +401,8 @@ void OVERLAY_edit_uv_cache_init(OVERLAY_Data *vedata)
/* HACK: When editing objects that share the same mesh we should only draw the
* first one in the order that is used during uv editing. We can only trust that the first object
* has the correct batches with the correct selection state. See T83187. */
- if (pd->edit_uv.do_uv_overlay || pd->edit_uv.do_uv_shadow_overlay) {
+ if ((pd->edit_uv.do_uv_overlay || pd->edit_uv.do_uv_shadow_overlay) &&
+ draw_ctx->obact->type == OB_MESH) {
uint objects_len = 0;
Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(
draw_ctx->view_layer, NULL, &objects_len, draw_ctx->object_mode);