Skip to content

Commit

Permalink
Ignore HFrame resize events with an invalid size
Browse files Browse the repository at this point in the history
No idea why that happens sometimes, but it does (we get negative values for
width or height.)
  • Loading branch information
realnc committed Aug 15, 2012
1 parent 5369d7d commit d3af557
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hframe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ HFrame::paintEvent( QPaintEvent* )
void
HFrame::resizeEvent( QResizeEvent* e )
{
// Ignore invalid resizes. No idea why that happens sometimes, but it
// does (we get negative values for width or height.)
if (not e->size().isValid()) {
e->ignore();
return;
}

// Save a copy of the current pixmap.
const QPixmap& tmp = this->fPixmap.copy();

Expand Down

0 comments on commit d3af557

Please sign in to comment.