diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-05-15 11:52:55 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-05-15 11:53:50 (GMT) |
commit | b8058b594534050909cf0dfc6b4be2a1b6a4dc1b (patch) | |
tree | d73eaa9a07f2d777e1f5813d1915b794c651ed59 /src/gui/painting | |
parent | 7f0b4d3b99bb767724a09234768104e18aa52b0e (diff) | |
download | Qt-b8058b594534050909cf0dfc6b4be2a1b6a4dc1b.zip Qt-b8058b594534050909cf0dfc6b4be2a1b6a4dc1b.tar.gz Qt-b8058b594534050909cf0dfc6b4be2a1b6a4dc1b.tar.bz2 |
Prevented QClipData related crashes.
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 87e9283..0e8f50a 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -4344,6 +4344,7 @@ void QClipData::initialize() m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight); m_spans = (QSpan *)malloc(clipSpanHeight*sizeof(QSpan)); + allocated = clipSpanHeight; if (hasRectClip) { int y = 0; @@ -4388,6 +4389,7 @@ void QClipData::initialize() int y = 0; int firstInBand = 0; + count = 0; while (firstInBand < numRects) { const int currMinY = rects.at(firstInBand).y(); const int currMaxY = currMinY + rects.at(firstInBand).height(); @@ -4502,7 +4504,7 @@ void QClipData::setClipRect(const QRect &rect) ymax = qMin(rect.y() + rect.height(), clipSpanHeight); if (m_spans) { - delete m_spans; + free(m_spans); m_spans = 0; } @@ -4532,7 +4534,7 @@ void QClipData::setClipRegion(const QRegion ®ion) } if (m_spans) { - delete m_spans; + free(m_spans); m_spans = 0; } |