summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-21 16:12:41 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-21 16:12:41 +0100
commitc7c9fd2337b06498c3d04799d12382c156d873fb (patch)
tree0856056293ab99a2c7e1a3af271db066920cb9ca
parent6f2c68b2bc3e2864ca1e731b8c8967c56ddc545b (diff)
parentc7155c05394649a08b494a63d22f4ba3039a7a98 (diff)
downloadqtimageformats-c7c9fd2337b06498c3d04799d12382c156d873fb.tar.gz
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: Id484a6b43e3ee15e06e8291ae69f717b855a2fe5
-rw-r--r--src/plugins/imageformats/mng/qmnghandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/imageformats/mng/qmnghandler.cpp b/src/plugins/imageformats/mng/qmnghandler.cpp
index eefb056..c34c1ad 100644
--- a/src/plugins/imageformats/mng/qmnghandler.cpp
+++ b/src/plugins/imageformats/mng/qmnghandler.cpp
@@ -341,7 +341,8 @@ bool QMngHandlerPrivate::jumpToImage(int imageNumber)
bool QMngHandlerPrivate::jumpToNextImage()
{
- return jumpToImage((currentImageNumber()+1) % imageCount());
+ const int numImages = imageCount();
+ return numImages > 1 && jumpToImage((currentImageNumber() + 1) % numImages);
}
int QMngHandlerPrivate::nextImageDelay() const