projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://www.jwz.org/xscreensaver/xscreensaver-5.12.tar.gz
[xscreensaver]
/
hacks
/
glx
/
tunnel_draw.c
diff --git
a/hacks/glx/tunnel_draw.c
b/hacks/glx/tunnel_draw.c
index c87fea9dd57a875f4989df065180b2c6144d21aa..8230ca08a84c8fa154fd7e5a5152016fee940b87 100644
(file)
--- a/
hacks/glx/tunnel_draw.c
+++ b/
hacks/glx/tunnel_draw.c
@@
-207,6
+207,7
@@
static void LoadPath(struct tunnel_state *st)
}
else
{
}
else
{
+ path1 = st->path;
path2 = (tnPath *)malloc(sizeof(tnPath));
path1->next = path2;
path1 = path2;
path2 = (tnPath *)malloc(sizeof(tnPath));
path1->next = path2;
path1 = path2;
@@
-249,7
+250,9
@@
void DrawTunnel(struct tunnel_state *st,
cmpos = st->cam_pos;
/* Get current curve */
cmpos = st->cam_pos;
/* Get current curve */
- if (st->cam_pos->next->next->next)
+ if (st->cam_pos->next &&
+ st->cam_pos->next->next &&
+ st->cam_pos->next->next->next)
{
p1 = st->cam_pos;
for (i=0; i<4; i++)
{
p1 = st->cam_pos;
for (i=0; i<4; i++)