Fix two potential NULL dereferences caught by Clang.

pull/193/head
Michael R Sweet 16 years ago
parent 9643c13183
commit fcdfa5a09d
  1. 2
      doc/reference.html
  2. 4
      mxmldoc.c

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documentation</title>

@ -2739,7 +2739,7 @@ write_description(
else
ptr --;
if (element[0])
if (element && *element)
fprintf(out, "<code>%s</code>", start);
else if (element)
fputs(start, out);
@ -2757,7 +2757,7 @@ write_description(
else
ptr --;
if (element[0])
if (element && *element)
fprintf(out, "<a href=\"#%s\"><code>%s</code></a>", start, start);
else if (element)
fputs(start, out);

Loading…
Cancel
Save