some defensive checks added
This commit is contained in:
parent
3f70ff764f
commit
ab3ec52e78
@ -294,7 +294,7 @@ void QskScrollView::ensureVisible( const QPointF& pos )
|
|||||||
|
|
||||||
const QPoint newPos( x - margin, y - margin );
|
const QPoint newPos( x - margin, y - margin );
|
||||||
|
|
||||||
if ( isInitiallyPainted() )
|
if( isInitiallyPainted() && window() )
|
||||||
scrollTo( newPos );
|
scrollTo( newPos );
|
||||||
else
|
else
|
||||||
setScrollPos( newPos );
|
setScrollPos( newPos );
|
||||||
@ -338,7 +338,7 @@ void QskScrollView::ensureVisible( const QRectF& itemRect )
|
|||||||
|
|
||||||
const QPoint newPos( x - margin, y - margin );
|
const QPoint newPos( x - margin, y - margin );
|
||||||
|
|
||||||
if ( isInitiallyPainted() )
|
if( isInitiallyPainted() && window() )
|
||||||
scrollTo( newPos );
|
scrollTo( newPos );
|
||||||
else
|
else
|
||||||
setScrollPos( newPos );
|
setScrollPos( newPos );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user