Fix T65657: crash in float texture painting, after recent changes

This commit is contained in:
2019-06-09 22:03:01 +02:00
parent 6797e80f2e
commit 5dc9797f0b

View File

@@ -400,7 +400,7 @@ static void gpu_texture_update_from_ibuf(Image *ima, ImBuf *ibuf, int x, int y,
const bool store_premultiplied = (ima->alpha_mode != IMA_ALPHA_STRAIGHT);
if (ibuf->channels != 4 || scaled || !store_premultiplied) {
rect_float = MEM_mallocN(sizeof(float) * 4 * x * y, __func__);
rect_float = MEM_mallocN(sizeof(float) * 4 * w * h, __func__);
if (rect_float == NULL) {
return;
}