Commit 5083170e authored by Benjamin Löwe's avatar Benjamin Löwe
Browse files

Fix for bug 304451 - Gwenview error while watching photos:

Don't show next frame when there are none.

BUG: 304451
REVIEW: 107932
FIXED-IN: 2.9.5
parent fac88002
......@@ -75,8 +75,10 @@ void LoadingIndicator::paint(QPainter* painter, const QStyleOptionGraphicsItem*,
void LoadingIndicator::showNextFrame()
{
d->mIndex = (d->mIndex + 1) % d->mSequence.frameCount();
update();
if (d->mSequence.frameCount() > 0) {
d->mIndex = (d->mIndex + 1) % d->mSequence.frameCount();
update();
}
}
QVariant LoadingIndicator::itemChange(GraphicsItemChange change, const QVariant& value)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment