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:
authorCampbell Barton <ideasman42@gmail.com>2021-06-23 12:44:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-23 12:45:48 +0300
commit635b4db162731a100c255faa11ca9e2bd40d7d93 (patch)
treedef47b42a1e4f859989e15baeee4f40b1bbc331a /source/blender/editors/mesh/editmesh_select.c
parenta6f275cad32e9566a9028318c21b70c2a9ece66d (diff)
Fix T89367: Crash running edit-mesh select_linked_pick from Python
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select.c')
-rw-r--r--source/blender/editors/mesh/editmesh_select.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index c600df503d8..46abf71c4e2 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -3642,8 +3642,9 @@ static int edbm_select_linked_pick_exec(bContext *C, wmOperator *op)
{
ViewLayer *view_layer = CTX_data_view_layer(C);
- const int object_index = RNA_int_get(op->ptr, "object_index");
- const int index = RNA_int_get(op->ptr, "index");
+ /* Intentionally wrap negative values so the lookup fails. */
+ const uint object_index = (uint)RNA_int_get(op->ptr, "object_index");
+ const uint index = (uint)RNA_int_get(op->ptr, "index");
ele = EDBM_elem_from_index_any_multi(view_layer, object_index, index, &obedit);
}