diff options
-rw-r--r-- | backends/platform/psp/image_viewer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/platform/psp/image_viewer.cpp b/backends/platform/psp/image_viewer.cpp index dbcafd3898..66512e450b 100644 --- a/backends/platform/psp/image_viewer.cpp +++ b/backends/platform/psp/image_viewer.cpp @@ -145,8 +145,10 @@ void ImageViewer::setVisible(bool visible) { _visible = true; setViewerButtons(true); - GUI::TimedMessageDialog dialog("Image Viewer", 1000); - dialog.runModal(); + { // so dialog goes out of scope, destroying all allocations + GUI::TimedMessageDialog dialog("Image Viewer", 1000); + dialog.runModal(); + } runLoop(); // only listen to viewer events } else { // we were asked to make invisible or failed to load |