summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/minesweep/minefield.cpp4
-rw-r--r--noncore/net/opieirc/ircsession.cpp8
-rw-r--r--noncore/todayplugins/stockticker/libstocks/csv.c3
3 files changed, 10 insertions, 5 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
@@ -706,2 +706,4 @@ void MineField::readConfig(Config& cfg)
Mine* m = mine( y, x );
+ if (!m)
+ continue;
if ( st >= 5 ) {
@@ -730,3 +732,3 @@ void MineField::readConfig(Config& cfg)
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
@@ -142,5 +142,7 @@ void IRCSession::updateNickname(const QString &oldNickname, const QString &newNi
IRCChannelPerson *chanperson = it.current()->getPerson(oldNickname);
- it.current()->removePerson(chanperson);
- chanperson->setNick(newNickname);
- it.current()->addPerson(chanperson);
+ if (chanperson) {
+ it.current()->removePerson(chanperson);
+ chanperson->setNick(newNickname);
+ it.current()->addPerson(chanperson);
+ }
}
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
@@ -316,3 +316,4 @@ 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;