altosuilib: Don't try to draw to destroyed map windows
authorKeith Packard <keithp@keithp.com>
Wed, 28 May 2014 17:31:47 +0000 (10:31 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 28 May 2014 17:31:47 +0000 (10:31 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosSiteMapImage.java

index ae32418fc1011b63229b54d5bcc8cdc3100c8026..f1cfa7c0a790a4be44c56605f663d03169614bb3 100644 (file)
@@ -50,7 +50,8 @@ public class AltosSiteMapImage {
                                                                public void run() {
                                                                        AltosSiteMap.debug_component(tile, file.toString());
                                                                        Graphics2D g2d = (Graphics2D) tile.getGraphics();
-                                                                       tile.paint_graphics(g2d, image, serial);
+                                                                       if (g2d != null)
+                                                                               tile.paint_graphics(g2d, image, serial);
                                                                        load_thread = null;
                                                                }
                                                        });