diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/framework/Utilities/LinkedList.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/framework/Utilities/LinkedList.h b/src/framework/Utilities/LinkedList.h index 12fa878d07f..0f7bcc144b2 100644 --- a/src/framework/Utilities/LinkedList.h +++ b/src/framework/Utilities/LinkedList.h @@ -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; } |