From 9d6411b7d2a859ebc7a8f1bf9c477038ede28747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= <andreas@lonelycoder.com> Date: Fri, 2 May 2008 10:00:38 +0000 Subject: [PATCH] Don't crash if transport is not yet mapped to a channel --- teletext.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teletext.c b/teletext.c index b53e5559..d37f206a 100644 --- a/teletext.c +++ b/teletext.c @@ -184,6 +184,9 @@ tt_decode_line(th_transport_t *t, uint8_t *buf) tt_decoder_t *ttd = &ch->ch_tt; tt_page_t *ttp; + if(ch == NULL) + return; /* Not mapped to a channel, do not do anything */ + mpag = ham_decode(buf[0], buf[1]); magidx = mpag & 7;