From 9892b39567d9a0e27ea530d36c1b8decb3489b4a Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 26 Jan 2014 17:56:55 +0100 Subject: charcell: Fix lockup after some scrolling lines. Change-Id: I5cabbd396e2a6d4e9fd8e92090624643797af34a --- firmware/drivers/lcd-charcell.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'firmware/drivers') diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c index 46c48bb726..b1f0021ff7 100644 --- a/firmware/drivers/lcd-charcell.c +++ b/firmware/drivers/lcd-charcell.c @@ -354,7 +354,7 @@ void lcd_clear_display(void) int x, y; struct viewport* old_vp = current_vp; - lcd_scroll_info.lines = 0; + lcd_scroll_stop(); lcd_remove_cursor(); /* Set the default viewport - required for lcd_putxchar */ @@ -578,6 +578,10 @@ bool lcd_putsxy_scroll_func(int x, int y, const unsigned char *string, static void lcd_scroll_fn(struct scrollinfo* s) { + /* with line == NULL when scrolling stops. This scroller + * maintains no userdata so there is nothing left to do */ + if (!s->line) + return; lcd_putsxyofs(s->x, s->y, s->offset, s->line); if (lcd_cursor.enabled) { -- cgit v1.2.3