Skip to content

Commit 046d0ff

Browse files
committedApr 29, 2014
[composer] Prevent hangs when using html multi frames with a very small first frame
1 parent dd739ef commit 046d0ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/core/composer/qgscomposerhtml.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ double QgsComposerHtml::findNearbyPageBreak( double yPos )
185185
QRgb currentColor;
186186
QRgb pixelColor;
187187
QList< QPair<int, int> > candidates;
188-
for ( int candidateRow = idealPos; candidateRow >= idealPos - maxSearchDistance; --candidateRow )
188+
int minRow = qMax( idealPos - maxSearchDistance, 0 );
189+
for ( int candidateRow = idealPos; candidateRow >= minRow; --candidateRow )
189190
{
190191
changes = 0;
191192
currentColor = qRgba( 0, 0, 0, 0 );

0 commit comments

Comments
 (0)
Please sign in to comment.