Color picker crash fix.
Color arrays in RNA are 4 floats but handlers used 3 floats. Overflow galore.
This commit is contained in:
@@ -377,7 +377,7 @@ struct uiPopupBlockHandle {
|
||||
int butretval;
|
||||
int menuretval;
|
||||
float retvalue;
|
||||
float retvec[3];
|
||||
float retvec[4];
|
||||
};
|
||||
|
||||
uiBlock *ui_block_func_COL(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
|
||||
|
||||
@@ -1597,7 +1597,7 @@ static void do_picker_rna_cb(bContext *C, void *bt1, void *unused)
|
||||
uiPopupBlockHandle *popup= but->block->handle;
|
||||
PropertyRNA *prop = but->rnaprop;
|
||||
PointerRNA ptr = but->rnapoin;
|
||||
float rgb[3];
|
||||
float rgb[4];
|
||||
|
||||
if (&ptr && prop) {
|
||||
RNA_property_float_get_array(&ptr, prop, rgb);
|
||||
|
||||
Reference in New Issue
Block a user