-rw-r--r-- | noncore/games/minesweep/minefield.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/games/minesweep/minefield.cpp b/noncore/games/minesweep/minefield.cpp index 72c05b0..1987ea5 100644 --- a/noncore/games/minesweep/minefield.cpp +++ b/noncore/games/minesweep/minefield.cpp @@ -705,4 +705,6 @@ void MineField::readConfig(Config& cfg) int st = (char)(QChar)grid[i++]-code; Mine* m = mine( y, x ); + if (!m) + continue; if ( st >= 5 ) { st-=5; @@ -729,5 +731,5 @@ void MineField::readConfig(Config& cfg) for ( int y = 0; y < numRows; y++ ) { Mine* m = mine( y, x ); - if ( m->state() == Mine::Empty ) + if ( m && m->state() == Mine::Empty ) m->setHint(getHint(y,x)); } |