diff options
Diffstat (limited to 'src/gui/painting/qrasterizer.cpp')
-rw-r--r-- | src/gui/painting/qrasterizer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 58e4b4e..6d15271 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; } } |