diff options
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 70b715e0119..bf855db07e9 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -987,7 +987,8 @@ int /*eContextResult*/ buttons_context(const bContext *C, matnr = 0; } /* Keep aligned with rna_Object_material_slots_get. */ - CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, POINTER_FROM_INT(matnr + 1)); + CTX_data_pointer_set( + result, &ob->id, &RNA_MaterialSlot, (void *)(matnr + (uintptr_t)&ob->id)); } } |