~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct code to insert into a doubly-linked list.
[sgt/putty]
/
mac
/
macterm.c
diff --git
a/mac/macterm.c
b/mac/macterm.c
index
b38c3ec
..
014260c
100644
(file)
--- a/
mac/macterm.c
+++ b/
mac/macterm.c
@@
-1,4
+1,4
@@
-/* $Id: macterm.c,v 1.4
0 2003/01/12 01:25:3
4 ben Exp $ */
+/* $Id: macterm.c,v 1.4
1 2003/01/12 13:50:0
4 ben Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
@@
-188,7
+188,8
@@
void mac_startsession(Session *s)
ShowWindow(s->window);
s->next = sesslist;
s->prev = s->next->prev;
ShowWindow(s->window);
s->next = sesslist;
s->prev = s->next->prev;
- s->next->prev = &s->next;
+ if (ret->next != NULL)
+ s->next->prev = &s->next;
sesslist = s;
}
sesslist = s;
}