gnome-games r7443 - in trunk/gnome-sudoku: . src/lib
- From: andreasr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7443 - in trunk/gnome-sudoku: . src/lib
- Date: Sat, 1 Mar 2008 20:56:14 +0000 (GMT)
Author: andreasr
Date: Sat Mar 1 20:56:13 2008
New Revision: 7443
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7443&view=rev
Log:
Fix crash when starting new game. Patch by my in bug #513894.
Modified:
trunk/gnome-sudoku/ChangeLog
trunk/gnome-sudoku/src/lib/gsudoku.py
Modified: trunk/gnome-sudoku/src/lib/gsudoku.py
==============================================================================
--- trunk/gnome-sudoku/src/lib/gsudoku.py (original)
+++ trunk/gnome-sudoku/src/lib/gsudoku.py Sat Mar 1 20:56:13 2008
@@ -902,6 +902,10 @@
self.unhighlight_cells()
if not hasattr(self,'box_color'): self.get_highlight_colors()
my_x,my_y = self.focused.x,self.focused.y
+
+ # col_coords can sometimes be null.
+ if not hasattr(self.grid, 'col_coords'): return
+
for x,y in self.grid.col_coords[my_x]:
if (x,y) != (my_x,my_y):
self.__entries__[(x,y)].set_background_color(self.col_color)
@@ -1150,7 +1154,7 @@
# Its possible this highlighted error was never
# added to our internal grid, in which case we'd
# better make sure it is...
- if not self.grid._get_(linked_entry.x,linked_entry.y):
+ if self.grid and not self.grid._get_(linked_entry.x,linked_entry.y):
# entry_validate will add the value to our
# internal grid if there are no other
# conflicts
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]