Bug 419096 - "getPathSegAtLength() causes nsSVGPathSegMovetoAbs to leak" [p=longsonr@gmail.com (Robert Longson) r+sr=roc a1.9=damons]

This commit is contained in:
reed@reedloden.com 2008-02-26 01:51:31 -08:00
Родитель c6632d60fc
Коммит 5afb0d4f7b
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -151,9 +151,9 @@ nsSVGPathElement::GetPathSegAtLength(float distance, PRUint32 *_retval)
// because if distance is longer than the total length of the path we return
// the index of the final segment anyway.
while (distCovered < distance && i < numSegments - 1) {
nsIDOMSVGPathSeg *iSeg;
mSegments->GetItem(i, &iSeg);
nsSVGPathSeg* curSeg = static_cast<nsSVGPathSeg*>(iSeg);
nsCOMPtr<nsIDOMSVGPathSeg> segment;
mSegments->GetItem(i, getter_AddRefs(segment));
nsSVGPathSeg* curSeg = static_cast<nsSVGPathSeg*>(segment.get());
if (i == 0) {
curSeg->GetLength(&ts);
} else {