src/corelib/tools/qstring.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 5 d3bac044e0f0
--- a/src/corelib/tools/qstring.cpp	Mon Mar 15 12:43:09 2010 +0200
+++ b/src/corelib/tools/qstring.cpp	Thu Apr 08 14:19:33 2010 +0300
@@ -3185,7 +3185,7 @@
         if (!empty || !(flags & SectionSkipEmpty))
             x++;
     }
-    if((flags & SectionIncludeLeadingSep)) {
+    if((flags & SectionIncludeLeadingSep) && first_i < sections.size()) {
         const qt_section_chunk &section = sections.at(first_i);
         ret.prepend(section.string.left(section.length));
     }