]> git.zerfleddert.de Git - micropolis/commitdiff
fix for crash when falling back from shared memory to wired mode.
authorMichael Gernoth <michael@gernoth.net>
Wed, 16 Jan 2008 22:15:09 +0000 (23:15 +0100)
committerMichael Gernoth <michael@gernoth.net>
Wed, 16 Jan 2008 22:15:09 +0000 (23:15 +0100)
(the big_tile_pixmap is inaccessible while it is recreated, so
 do not try to access it)

src/sim/g_bigmap.c

index d70225d5171c89f080ad1edaaec300958746a34e..2b2bb9dd04ca41d604162433f21a2ff714f1d5d8 100644 (file)
@@ -310,9 +310,11 @@ WireDrawBeegMapRect(SimView *view, short x, short y, short w, short h)
 
       if (tile != *ha) {
        *ha = tile;
 
       if (tile != *ha) {
        *ha = tile;
-       XCopyArea(view->x->dpy, view->x->big_tile_pixmap, view->pixmap,
+       if (view->x->big_tile_pixmap) {
+         XCopyArea(view->x->dpy, view->x->big_tile_pixmap, view->pixmap,
                  view->x->gc, 0, tile * 16, 16, 16,
                  col * 16, row * 16);
                  view->x->gc, 0, tile * 16, 16, 16,
                  col * 16, row * 16);
+       }
       }
     }
     map += mm;
       }
     }
     map += mm;
Impressum, Datenschutz