diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-09-30 11:19:08 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-09-30 11:21:19 (GMT) |
commit | 718d22962de9b2798ccae4aac6cb5e3798d440a1 (patch) | |
tree | f63c06b8ef4095e05a2da02792768d0f8e51a78a /src | |
parent | b8089f0b7a0fef9318070aea9c8344bfe987bac9 (diff) | |
download | Qt-718d22962de9b2798ccae4aac6cb5e3798d440a1.zip Qt-718d22962de9b2798ccae4aac6cb5e3798d440a1.tar.gz Qt-718d22962de9b2798ccae4aac6cb5e3798d440a1.tar.bz2 |
Fixed accessing freed memory in raster engine.
The bug was discovered when running the svgviewer example on
64-bit Windows.
Reviewed-by: Samuel
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 36e1082..9749244 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -4233,6 +4233,8 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline, break; } + rendered_spans += q_gray_rendered_spans(*grayRaster.data()); + #if defined(Q_WS_WIN64) _aligned_free(rasterPoolBase); #else @@ -4251,8 +4253,6 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline, #endif Q_CHECK_PTR(rasterPoolBase); // note: we just freed the old rasterPoolBase. I hope it's not fatal. - rendered_spans += q_gray_rendered_spans(*grayRaster.data()); - qt_ft_grays_raster.raster_done(*grayRaster.data()); qt_ft_grays_raster.raster_new(grayRaster.data()); qt_ft_grays_raster.raster_reset(*grayRaster.data(), rasterPoolBase, rasterPoolSize); |