Fix a bug in memGallery::readBlock

This line was intended to check the value of done, not for a null pointer.
The code could cause an infinite loop in some circumstances.

Signed-off-by: caotto <ottochar@gmail.com>