From 3adeae2026d016ab608b19e3e6e1c5a8a05b99be Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Mon, 13 Dec 2021 23:20:42 +0100 Subject: ImageViewer: Fix crash when zooming on grayscale devices lcd_update was called while the grayscale overlay was running regression, apparently introduced by 0ceaff2 (only reproducible on target, not in Simulator) Change-Id: Ife0ef359e19a03a6dc033070a11ae5843ee555e6 --- apps/plugins/imageviewer/imageviewer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index 508cf1a5b5..a2b3bb680a 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c @@ -968,11 +968,13 @@ static int load_and_show(char* filename, struct image_info *info) break; } +#ifdef USEGSLIB + grey_show(false); /* switch off overlay */ +#endif rb->lcd_clear_display(); } while (status > PLUGIN_OTHER); #ifdef USEGSLIB - grey_show(false); /* switch off overlay */ rb->lcd_update(); #endif return status; -- cgit v1.2.3