Color picker crash fix.

Color arrays in RNA are 4 floats but handlers used 3 floats. Overflow galore.
This commit is contained in:
2010-01-09 19:00:41 +00:00
parent 670d55f097
commit 30f26a2826
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);