]> git.proxmox.com Git - spiceterm.git/commitdiff
remove unneeded assertion
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 8 Oct 2013 09:29:17 +0000 (11:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 8 Oct 2013 09:29:17 +0000 (11:29 +0200)
screen.c

index 8d077d1200fc387ad318f050bebc8c70d82342af..265d986c5150dd670b66ac2e0f928163d0755c85 100644 (file)
--- a/screen.c
+++ b/screen.c
@@ -350,11 +350,16 @@ create_primary_surface(SpiceScreen *spice_screen, uint32_t width,
     QXLWorker *qxl_worker = spice_screen->qxl_worker;
     QXLDevSurfaceCreate surface = { 0, };
 
-    g_assert(height <= MAX_HEIGHT);
-    g_assert(width <= MAX_WIDTH);
     g_assert(height > 0);
     g_assert(width > 0);
 
+    if (height > MAX_HEIGHT)
+        height = MAX_HEIGHT;
+
+    if (width > MAX_WIDTH)
+        width = MAX_WIDTH;
+
+
     surface.format     = SPICE_SURFACE_FMT_32_xRGB;
     surface.width      = spice_screen->primary_width = width;
     surface.height     = spice_screen->primary_height = height;