summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qrasterizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qrasterizer.cpp')
-rw-r--r--src/gui/painting/qrasterizer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index bfd53b6d14..fa07bcbeb9 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -436,8 +436,9 @@ void QScanConverter::end()
inline void QScanConverter::allocate(int size)
{
if (m_alloc < size) {
- m_alloc = qMax(size, 2 * m_alloc);
- m_intersections = (Intersection *)realloc(m_intersections, m_alloc * sizeof(Intersection));
+ int newAlloc = qMax(size, 2 * m_alloc);
+ m_intersections = q_check_ptr((Intersection *)realloc(m_intersections, newAlloc * sizeof(Intersection)));
+ m_alloc = newAlloc;
}
}