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.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index 583885c..3c06bb4 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -436,8 +436,11 @@ 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);
+ Intersection *newIntersections = (Intersection *)realloc(m_intersections, newAlloc * sizeof(Intersection));
+ Q_CHECK_PTR(newIntersections);
+ m_alloc = newAlloc;
+ m_intersections = newIntersections;
}
}