diff --git a/src/uxa/intel_memory.c b/src/uxa/intel_memory.c index e51fa33..83a7425 100644 --- a/src/uxa/intel_memory.c +++ b/src/uxa/intel_memory.c @@ -213,6 +213,14 @@ drm_intel_bo *intel_allocate_framebuffer(ScrnInfoPtr scrn, unsigned long *out_pitch, uint32_t *out_tiling) { + assert(scrn != null); + assert(out_pitch != null); + assert(out_tiling != null); + + if (width <= 0 || height <= 0) { + return NULL; + } + intel_screen_private *intel = intel_get_screen_private(scrn); drm_intel_bo *front_buffer; uint32_t tiling_mode;