diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-03-04 10:56:18 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-03-04 10:56:18 -0500 |
commit | f7c3c4ca429260c4d056b1e032e05162e25554ca (patch) | |
tree | 8317fd8852ed2996cf2edf2838c7f43f4023bcd5 /WWW/Library/Implementation/HTAnchor.c | |
parent | c5fef0d4ab035d8fd988270a39ed6f9d0e9b214c (diff) | |
download | lynx-snapshots-f7c3c4ca429260c4d056b1e032e05162e25554ca.tar.gz |
snapshot of project "lynx", label v2-8-2dev_18
Diffstat (limited to 'WWW/Library/Implementation/HTAnchor.c')
-rw-r--r-- | WWW/Library/Implementation/HTAnchor.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c index 9e3933ad..9be41d00 100644 --- a/WWW/Library/Implementation/HTAnchor.c +++ b/WWW/Library/Implementation/HTAnchor.c @@ -901,11 +901,21 @@ PUBLIC void HTAnchor_setTitle ARGS2( int i; if (me) { - StrAllocCopy(me->title, title); - for (i = 0; me->title[i]; i++) { - if ((unsigned char)me->title[i] == 1 || - (unsigned char)me->title[i] == 2) { - me->title[i] = ' '; + if (title) { + StrAllocCopy(me->title, title); + for (i = 0; me->title[i]; i++) { + if ((unsigned char)me->title[i] == 1 || + (unsigned char)me->title[i] == 2) { + me->title[i] = ' '; + } + } + } else { + CTRACE(tfp,"HTAnchor_setTitle: New title is NULL! "); + if (me->title) { + CTRACE(tfp,"Old title was \"%s\".\n", me->title); + FREE(me->title); + } else { + CTRACE(tfp,"Old title was NULL.\n"); } } } |