Fixed XrPathClose to deal with empty path

This commit is contained in:
Carl Worth 2002-08-12 11:43:56 +00:00
parent c2824c4ded
commit 9824dc8944
2 changed files with 8 additions and 4 deletions

View file

@ -168,6 +168,8 @@ XrPathLineTo(XrPath *path, const XPointDouble *pt)
void
XrPathClose(XrPath *path)
{
XrSubPathClose(path->tail);
XrPathNewSubPath(path);
if (path->tail) {
XrSubPathClose(path->tail);
XrPathNewSubPath(path);
}
}

View file

@ -168,6 +168,8 @@ XrPathLineTo(XrPath *path, const XPointDouble *pt)
void
XrPathClose(XrPath *path)
{
XrSubPathClose(path->tail);
XrPathNewSubPath(path);
if (path->tail) {
XrSubPathClose(path->tail);
XrPathNewSubPath(path);
}
}