From 50fd1f1004f4a9f12ac1d41551a52ab7cd19aaf9 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Wed, 19 Mar 2014 03:51:25 +0100 Subject: [PATCH] lcd_locate is useless, if not initialized --- lcd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lcd.c b/lcd.c index e1341ce..ce65e92 100644 --- a/lcd.c +++ b/lcd.c @@ -245,6 +245,10 @@ void lcd_clear(void) void lcd_locate(uint8_t row, uint8_t col) { + if (!lcd_initialized) { + return; + } + if (row) col += 0x40; lcd_send_byte(0x80 + col, 0);