Skip to content

Commit

Permalink
[composer] Prevent hangs when using html multi frames with a very sma…
Browse files Browse the repository at this point in the history
…ll first frame
  • Loading branch information
nyalldawson committed Apr 29, 2014
1 parent dd739ef commit 046d0ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposerhtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ double QgsComposerHtml::findNearbyPageBreak( double yPos )
QRgb currentColor;
QRgb pixelColor;
QList< QPair<int, int> > candidates;
for ( int candidateRow = idealPos; candidateRow >= idealPos - maxSearchDistance; --candidateRow )
int minRow = qMax( idealPos - maxSearchDistance, 0 );
for ( int candidateRow = idealPos; candidateRow >= minRow; --candidateRow )
{
changes = 0;
currentColor = qRgba( 0, 0, 0, 0 );
Expand Down

0 comments on commit 046d0ff

Please sign in to comment.