From fe4ed1df8325bc195c5a1becb8a667bf34a88c44 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 19 Mar 2011 16:58:00 +0000 Subject: don't try disconnecting None blocks --- (limited to 'TurtleArt/tawindow.py') diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 0102dc6..8a6cad5 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -1223,8 +1223,7 @@ class TurtleArtWindow(): def process_data(self, block_data, offset=0): """ Process block_data (from a macro, a file, or the clipboard). """ - if offset != 0: - debug_output("offset is %d" % (offset), self.running_sugar) + # Create the blocks (or turtle). blocks = [] for blk in block_data: @@ -1934,6 +1933,8 @@ class TurtleArtWindow(): def _disconnect(self, blk): """ Disconnect block from stack above it. """ + if blk is None: + return if blk.connections[0] is None: return if collapsed(blk): -- cgit v0.9.1