diff --git a/source/blender/sequencer/intern/effects.cc b/source/blender/sequencer/intern/effects.cc index cd00229d236..df0d2e2fff9 100644 --- a/source/blender/sequencer/intern/effects.cc +++ b/source/blender/sequencer/intern/effects.cc @@ -1980,6 +1980,12 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i return; } + /* If result would be no blurring, early out. */ + halfWidth = ((quality + 1) * blur); + if (halfWidth == 0) { + return; + } + /* Allocate memory for the temp-map and the blur filter matrix. */ temp = static_cast(MEM_mallocN(sizeof(float[4]) * width * height, "blurbitmaptemp")); if (!temp) { @@ -1987,7 +1993,6 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i } /* Allocate memory for the filter elements */ - halfWidth = ((quality + 1) * blur); filter = (float *)MEM_mallocN(sizeof(float) * halfWidth * 2, "blurbitmapfilter"); if (!filter) { MEM_freeN(temp);