diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 76ef1c248e2..7ec6061cb4b 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1088,13 +1088,13 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT heap_free(backup); return status; } - if (format && format->line_align == StringAlignmentCenter && layoutRect->Y + args.maxY < layoutRect->Height) + if (format->line_align == StringAlignmentCenter && layoutRect->Y + args.maxY < layoutRect->Height) { float inc = layoutRect->Height + layoutRect->Y - args.maxY; inc /= 2; for (i = backup->pathdata.Count; i < path->pathdata.Count; ++i) path->pathdata.Points[i].Y += inc; - } else if (format && format->line_align == StringAlignmentFar) { + } else if (format->line_align == StringAlignmentFar) { float inc = layoutRect->Height + layoutRect->Y - args.maxY; for (i = backup->pathdata.Count; i < path->pathdata.Count; ++i) path->pathdata.Points[i].Y += inc;