about summary refs log tree commit diff stats
path: root/src/LYUtils.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2008-08-31 23:31:07 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2008-08-31 23:31:07 -0400
commitf06e47e4c02793186e0cb85966d7e4aac63c0618 (patch)
treee0e5c5a1b672ec8400035f6df507d4019e9a020d /src/LYUtils.c
parenta4209b5bd5a43a905b9fa6af78a028e50a89d640 (diff)
downloadlynx-snapshots-f06e47e4c02793186e0cb85966d7e4aac63c0618.tar.gz
snapshot of project "lynx", label v2-8-7dev_9f
Diffstat (limited to 'src/LYUtils.c')
-rw-r--r--src/LYUtils.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 806dfd06..4a7063ab 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYUtils.c,v 1.168 2008/06/29 21:44:03 tom Exp $ */
+/* $LynxId: LYUtils.c,v 1.169 2008/08/31 19:03:45 tom Exp $ */
 #include <HTUtils.h>
 #include <HTTCP.h>
 #include <HTParse.h>
@@ -1085,12 +1085,15 @@ void LYhighlight(int flag,
 	    int avail_space = (LYcolLimit - LXP) + (LYcolLimit * (LYlines - LYP));
 	    const char *text = LYGetHiliteStr(cur, 0);
 
+	    if (text == 0)
+		text = "";
+
 	    if (avail_space > links[cur].l_form->size)
 		avail_space = links[cur].l_form->size;
 
-	    gllen = LYmbcsstrlen(NonNull(text), utf_flag, NO);
-	    len = LYmbcs_skip_glyphs(NonNull(text), avail_space, utf_flag) - text;
-	    LYwaddnstr(LYwin, NonNull(text), len);
+	    gllen = LYmbcsstrlen(text, utf_flag, NO);
+	    len = LYmbcs_skip_glyphs(text, avail_space, utf_flag) - text;
+	    LYwaddnstr(LYwin, text, len);
 	    while (gllen++ < avail_space)
 		LYaddch('_');