PSP: add missing return statements to image viewer

svn-id: r53601
This commit is contained in:
Yotam Barnoy 2010-10-19 07:37:50 +00:00
parent c1a3689a5d
commit 00bf6ab791

View File

@ -75,16 +75,19 @@ bool ImageViewer::load(int imageNum) {
sprintf(error, "Cannot display %s. Not a proper PNG file", specificImageName.c_str());
GUI::TimedMessageDialog dialog(error, 4000);
dialog.runModal();
return false;
} else if (status == PngLoader::OUT_OF_MEMORY) {
sprintf(error, "Out of memory loading %s. Try making the image smaller", specificImageName.c_str());
GUI::TimedMessageDialog dialog(error, 4000);
dialog.runModal();
return false;
}
// try to load the image file
if (!image.load()) {
sprintf(error, "Cannot display %s. Not a proper PNG file", specificImageName.c_str());
GUI::TimedMessageDialog dialog(error, 4000);
dialog.runModal();
return false;
}
setConstantRendererOptions();