summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--lib/dlist.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d97dda..7420c4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
+03/19/2004 - Dr. Hannes Reinecke <hare@suse.de>
+ * Fixed SEGV in dlist.c
+
03/15/2004 - Ananth Mavinakayanahalli <ananth@in.ibm.com>
* Updated docs/libsysfs.txt for release 1.1.0
diff --git a/lib/dlist.c b/lib/dlist.c
index c6b104c..a324624 100644
--- a/lib/dlist.c
+++ b/lib/dlist.c
@@ -73,14 +73,14 @@ inline void *_dlist_mark_move(Dlist *list,int direction)
{
if(direction)
{
- if( list->marker->next!=NULL)
+ if( list->marker && list->marker->next!=NULL)
list->marker=list->marker->next;
else
return(NULL);
}
else
{
- if( list->marker->prev!=NULL)
+ if( list->marker && list->marker->prev!=NULL)
list->marker=list->marker->prev;
else
return(NULL);