diff options
Diffstat (limited to 'graphics/scaler.cpp')
| -rw-r--r-- | graphics/scaler.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index a35fb9046e..9ade0e6c57 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -24,6 +24,7 @@  #include "graphics/scaler/scalebit.h"  #include "common/util.h"  #include "common/system.h" +#include "common/textconsole.h"  int gBitFormat = 565; @@ -90,6 +91,9 @@ void InitLUT(Graphics::PixelFormat format) {  	if (RGBtoYUV == 0)  		RGBtoYUV = (uint32 *)malloc(65536 * sizeof(uint32)); +	if (!RGBtoYUV) +		error("[InitLUT] Cannot allocate memory for YUV/LUT buffers"); +  	for (int color = 0; color < 65536; ++color) {  		format.colorToRGB(color, r, g, b);  		Y = (r + g + b) >> 2;  | 
