diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index d3d7b3b7c1d..7813ae68371 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -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; } |