- Consider the return value from IntFillArc in IntArc. CID 1237076
- Remove an useless check in ENTRY_ReferenceEntryByHandle CID 731587
- Prevent an unlikely memory leak in PATH_WidenPath. CID 716634
- Minor cleanup.

svn path=/trunk/; revision=73878
This commit is contained in:
Kamil Hornicek
2017-02-22 10:26:40 +00:00
parent 9b3b1801ed
commit 53fdca886e
4 changed files with 16 additions and 18 deletions
+12 -9
View File
@@ -143,15 +143,18 @@ IntArc( DC *dc,
arctype);
}
ret = IntDrawArc( dc,
RectBounds.left,
RectBounds.top,
abs(RectBounds.right-RectBounds.left), // Width
abs(RectBounds.bottom-RectBounds.top), // Height
AngleStart,
AngleEnd,
arctype,
pbrPen);
if(ret)
{
ret = IntDrawArc( dc,
RectBounds.left,
RectBounds.top,
abs(RectBounds.right-RectBounds.left), // Width
abs(RectBounds.bottom-RectBounds.top), // Height
AngleStart,
AngleEnd,
arctype,
pbrPen);
}
psurf = dc->dclevel.pSurface;
if (NULL == psurf)
-8
View File
@@ -162,8 +162,6 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
Rect r1, r2;
int result = 1;
// START_DEBUG();
if ((r.width <= 2) || (r.height <= 2))
return app_fill_rect(g, r, pbrush, TRUE);
@@ -636,8 +634,6 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
Rect r1, r2;
int result = 1;
// START_DEBUG();
if ((r.width <= 2) || (r.height <= 2))
return app_fill_rect(g, r, pbrush, FALSE);
@@ -810,8 +806,6 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
/* Line descriptions */
POINT p0, p1, p2;
// START_DEBUG();
/* If angles differ by 360 degrees or more, close the shape */
if ((start_angle + 360 <= end_angle) ||
(start_angle - 360 >= end_angle))
@@ -1010,8 +1004,6 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
/* Line descriptions */
POINT p0, p1, p2;
// START_DEBUG();
/* If angles differ by 360 degrees or more, close the shape */
if ((start_angle + 360 <= end_angle) ||
(start_angle - 360 >= end_angle))
-1
View File
@@ -480,7 +480,6 @@ ENTRY_ReferenceEntryByHandle(HGDIOBJ hobj, FLONG fl)
/* Get the handle index and check if its too big */
ulIndex = GDI_HANDLE_GET_INDEX(hobj);
if (ulIndex >= GDI_HANDLE_COUNT) return NULL;
/* Get pointer to the entry */
pentry = &gpentHmgr[ulIndex];
+4
View File
@@ -1813,6 +1813,8 @@ PATH_WidenPath(DC *dc)
DPRINT1("Expected PT_MOVETO %s, got path flag %c\n",
i == 0 ? "as first point" : "after PT_CLOSEFIGURE",
flat_path->pFlags[i]);
if (pStrokes)
ExFreePoolWithTag(pStrokes, TAG_PATH);
PATH_UnlockPath(flat_path);
PATH_Delete(flat_path->BaseObject.hHmgr);
return FALSE;
@@ -1867,6 +1869,8 @@ PATH_WidenPath(DC *dc)
break;
default:
DPRINT1("Got path flag %c\n", flat_path->pFlags[i]);
if (pStrokes)
ExFreePoolWithTag(pStrokes, TAG_PATH);
PATH_UnlockPath(flat_path);
PATH_Delete(flat_path->BaseObject.hHmgr);
return FALSE;