diff options
author | aavit <eirik.aavitsland@digia.com> | 2014-11-04 13:04:57 +0100 |
---|---|---|
committer | aavit <eirik.aavitsland@theqtcompany.com> | 2014-11-05 09:45:39 +0100 |
commit | c7155c05394649a08b494a63d22f4ba3039a7a98 (patch) | |
tree | 3778e20c1c16f8d2de21ca71230922ad06a78bac | |
parent | fc8268c1a6000d0907491756631e78a33a7c9336 (diff) | |
download | qtimageformats-c7155c05394649a08b494a63d22f4ba3039a7a98.tar.gz |
QMngHandler: Avoid endless loop
In case the animation only has one frame, like Waves1.mng in the bug
report.
Task-number: QTBUG-42321
Change-Id: Id6616f4f51c1b6f06f7e4677cbd9e56135d2a52b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r-- | src/plugins/imageformats/mng/qmnghandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/imageformats/mng/qmnghandler.cpp b/src/plugins/imageformats/mng/qmnghandler.cpp index eabd12a..c34c1ad 100644 --- a/src/plugins/imageformats/mng/qmnghandler.cpp +++ b/src/plugins/imageformats/mng/qmnghandler.cpp @@ -342,7 +342,7 @@ bool QMngHandlerPrivate::jumpToImage(int imageNumber) bool QMngHandlerPrivate::jumpToNextImage() { const int numImages = imageCount(); - return numImages && jumpToImage((currentImageNumber() + 1) % numImages); + return numImages > 1 && jumpToImage((currentImageNumber() + 1) % numImages); } int QMngHandlerPrivate::nextImageDelay() const |