]> git.zerfleddert.de Git - micropolis/blobdiff - src/sim/g_bigmap.c
fix for crash when falling back from shared memory to wired mode.
[micropolis] / src / sim / g_bigmap.c
index 7e99174ea8759388bea5cfdb3f0beaedad639d8d..2b2bb9dd04ca41d604162433f21a2ff714f1d5d8 100644 (file)
@@ -192,6 +192,8 @@ MemDrawBeegMapRect(SimView *view, int x, int y, int w, int h)
          case 24:
          case 32:
            ROW16_32();
+           break;
+
          default:
            /* XXX: handle different depths */
            break;
@@ -308,9 +310,11 @@ WireDrawBeegMapRect(SimView *view, short x, short y, short w, short h)
 
       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);
+       }
       }
     }
     map += mm;
Impressum, Datenschutz