No divide by zero if all imageformat features are disabled

Change-Id: Ib3e8a4b62ae627bc3dc8541767dafff4e493d2f8
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
Stephan Binner 2017-04-03 20:47:20 +02:00
parent 267c2c2a93
commit 876563ced0

View File

@ -471,7 +471,8 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
--numFormats; --numFormats;
++currentFormat; ++currentFormat;
currentFormat %= _qt_NumFormats; if (currentFormat >= _qt_NumFormats)
currentFormat = 0;
} }
} }