Fix segfault in Tents' printing.
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 22 Oct 2005 18:18:21 +0000 (18:18 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 22 Oct 2005 18:18:21 +0000 (18:18 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6422 cda61777-01e9-0310-a592-d414129be87e

tents.c

diff --git a/tents.c b/tents.c
index 973c770..afed169 100644 (file)
--- a/tents.c
+++ b/tents.c
@@ -1976,7 +1976,7 @@ static void int_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
              * marginally nicer not to have the drag effects
              * flickering on and off disconcertingly.
              */
-            if (ui->drag_button >= 0)
+            if (ui && ui->drag_button >= 0)
                 v = drag_xform(ui, x, y, v);
 
             if (flashing && (v == TREE || v == TENT))