Fixed crash in LinkedListElement, thx Alexsot

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-17 06:42:04 +01:00
parent 242e6a7295
commit 3e03b0aa2d
+2 -2
View File
@@ -37,8 +37,8 @@ class LinkedListElement
LinkedListElement() { iNext = NULL; iPrev = NULL; }
~LinkedListElement() { delink(); }
bool hasNext() const { return(iNext->iNext != NULL); }
bool hasPrev() const { return(iPrev->iPrev != NULL); }
bool hasNext() const { return(iNext && iNext->iNext != NULL); }
bool hasPrev() const { return(iPrev && iPrev->iPrev != NULL); }
bool isInList() const { return(iNext != NULL && iPrev != NULL); }
LinkedListElement * next() { return hasNext() ? iNext : NULL; }