From 00bf6ab791f89db92052c62186465daf33f15e05 Mon Sep 17 00:00:00 2001 From: Yotam Barnoy Date: Tue, 19 Oct 2010 07:37:50 +0000 Subject: PSP: add missing return statements to image viewer svn-id: r53601 --- backends/platform/psp/image_viewer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backends') diff --git a/backends/platform/psp/image_viewer.cpp b/backends/platform/psp/image_viewer.cpp index f3bcd988a2..791a5cc0e3 100644 --- a/backends/platform/psp/image_viewer.cpp +++ b/backends/platform/psp/image_viewer.cpp @@ -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(); -- cgit v1.2.3