-rw-r--r-- | noncore/games/minesweep/minefield.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 2 | ||||
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/csv.c | 3 |
3 files changed, 7 insertions, 2 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)); } diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index c8d7869..d87ff80 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp @@ -141,8 +141,10 @@ void IRCSession::updateNickname(const QString &oldNickname, const QString &newNi for (;it.current(); ++it) { IRCChannelPerson *chanperson = it.current()->getPerson(oldNickname); + if (chanperson) { it.current()->removePerson(chanperson); chanperson->setNick(newNickname); it.current()->addPerson(chanperson); } + } emit updateChannels(); diff --git a/noncore/todayplugins/stockticker/libstocks/csv.c b/noncore/todayplugins/stockticker/libstocks/csv.c index 6170bed..86d8607 100644 --- a/noncore/todayplugins/stockticker/libstocks/csv.c +++ b/noncore/todayplugins/stockticker/libstocks/csv.c @@ -315,5 +315,6 @@ stock *parse_csv_history_file(char *csv_file) /* do not use the first line */ - end_line = strstr(line, "\n"); + if (!(end_line = strstr(line, "\n"))) + return 0; *end_line = 0; end_line++; |