BUG: check image content after attempt to read the frame

Fixes Slicer bug 3535