release dc for zero-length path

svn: r1690
This commit is contained in:
Matthew Flatt 2005-12-26 00:49:53 +00:00
parent 37e0505739
commit 6ccd32637c

View File

@ -698,11 +698,12 @@ void wxCanvasDC::DrawPath(wxPath *p, double xoffset, double yoffset, int fillSty
SetCurrentDC();
cnt = p->ToPolygons(&lens, &ptss, user_scale_x, user_scale_y);
if (!cnt)
if (!cnt) {
ReleaseCurrentDC();
return;
}
total_cnt = 0;
for (i = 0; i < cnt; i++) {