From 3e03b0aa2d7b369d7e12a9bcee81e421735c4dac Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Thu, 17 Dec 2009 06:42:04 +0100 Subject: Fixed crash in LinkedListElement, thx Alexsot --HG-- branch : trunk --- src/framework/Utilities/LinkedList.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/framework') 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; } -- cgit v1.2.3