src/gui/painting/qrasterizer.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/src/gui/painting/qrasterizer.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/gui/painting/qrasterizer.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -198,9 +198,11 @@
 };
 
 QScanConverter::QScanConverter()
-   : m_alloc(0)
+   : m_lines(0)
+   , m_alloc(0)
    , m_size(0)
    , m_intersections(0)
+   , m_active(0)
 {
 }
 
@@ -310,6 +312,10 @@
 template <typename T>
 void qScanConvert(QScanConverter &d, T allVertical)
 {
+    if (!d.m_lines.size()) {
+        d.m_active.reset();
+        return;
+    }
     qSort(d.m_lines.data(), d.m_lines.data() + d.m_lines.size(), QT_PREPEND_NAMESPACE(topOrder));
     int line = 0;
     for (int y = d.m_lines.first().top; y <= d.m_bottom; ++y) {