[gnome-sudoku] view: Add an assertion



commit 5786eb476ac86c3903c008928cff558955acf115
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Mar 12 16:42:05 2017 -0500

    view: Add an assertion
    
    I'm a bit nervous that no PangoLayout is created here, but it should be
    fine.

 src/sudoku-view.vala |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index 21d2a41..41a05c4 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -66,6 +66,7 @@ private class SudokuCellView : Gtk.DrawingArea
                 layout.set_font_description (style.font_desc);
                 return;
             }
+            assert (layout != null);
             game.insert (row, col, value);
         }
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]