ImageViewer: fix crash
ImageViewer: fix crash

steps to reproduce:
  - open 'TestQtcCrash.jpg'
  - truncate -s 0 ./TestQtcCrash.jpg
  - write valid image back to 'TestQtcCrash.jpg'

Change-Id: I76aed9379098c323f8434e0ab53b6561996fa281
Reviewed-by: Eike Ziller <c142da16c73a95a82d35191bcc55b22835617128@theqtcompany.com>

martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,xianian/qt-creator,xianian/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,xianian/qt-creator,xianian/qt-creator