It is illegal to create or resize a window to zero (or negative) width
and/or height. This patch prevents such a request from happening.
int width, int height,
int dx, int dy)
{
int width, int height,
int dx, int dy)
{
+ if (width <= 0 || height <= 0)
+ return;
+
egl_window->width = width;
egl_window->height = height;
egl_window->dx = dx;
egl_window->width = width;
egl_window->height = height;
egl_window->dx = dx;
{
struct wl_egl_window *egl_window;
{
struct wl_egl_window *egl_window;
+ if (width <= 0 || height <= 0)
+ return NULL;
+
egl_window = malloc(sizeof *egl_window);
if (!egl_window)
return NULL;
egl_window = malloc(sizeof *egl_window);
if (!egl_window)
return NULL;