[gnome-mines/wip/theming-support] Fixed potential crasher
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines/wip/theming-support] Fixed potential crasher
- Date: Wed, 7 Jan 2015 22:21:25 +0000 (UTC)
commit 13254fd9cf4360c8936141a3ec1c765c8d03cbf6
Author: Robert Roth <robert roth off gmail com>
Date: Thu Jan 8 00:21:12 2015 +0200
Fixed potential crasher
src/minefield-view.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index 861d7e5..faad916 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -592,9 +592,10 @@ public class MinefieldView : Gtk.Grid
public void refresh()
{
- for (int i = 0; i < _minefield.width; i++)
- for (int j = 0; j < _minefield.height; j++)
- mines[i,j].refresh_icon ();
+ if (_minefield != null)
+ for (int i = 0; i < _minefield.width; i++)
+ for (int j = 0; j < _minefield.height; j++)
+ mines[i,j].refresh_icon ();
}
public override bool key_release_event (Gdk.EventKey event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]