summaryrefslogtreecommitdiff
path: root/noncore/applets/notesapplet
authorerik <erik>2007-01-26 20:22:50 (UTC)
committer erik <erik>2007-01-26 20:22:50 (UTC)
commit53d630c9c4813142ee13e6843c30476a5db26e78 (patch) (side-by-side diff)
tree50a77a94cfeaccbb3d993bced8b7d0f498f74c7c /noncore/applets/notesapplet
parent152a8fe978851aea8dac6ae5cb11f73540746b83 (diff)
downloadopie-53d630c9c4813142ee13e6843c30476a5db26e78.zip
opie-53d630c9c4813142ee13e6843c30476a5db26e78.tar.gz
opie-53d630c9c4813142ee13e6843c30476a5db26e78.tar.bz2
Each file in this commit exhibit an example of what prevent calls
'reverse inull'. All that means is that a pointer gets dereferenced. Then a pointer gets checked for validity before being dereferenced again. This almost always points to shenanigans. For example, the konsole.cpp file has this konsoleInit() call which passes in a const char** shell variable. Since it is a double pointer the programmer who wrote the code made the mistake of mixing the checking of the pointer and the pointer that points to the pointer. This commit attempts to correct that. Of course there are other instances of the same thing. But they all boil down to a small mistake which might have produced strange side effects.
Diffstat (limited to 'noncore/applets/notesapplet') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/notesapplet/notes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp
index 13f297e..61a47d7 100644
--- a/noncore/applets/notesapplet/notes.cpp
+++ b/noncore/applets/notesapplet/notes.cpp
@@ -235,7 +235,7 @@ void NotesControl::showMenu() {
m->setFocus();
m->exec( QCursor::pos() );
- if(m) delete m;
+ delete m;
}
void NotesControl::focusOutEvent ( QFocusEvent * e) {