From f903f18b8a639bc80f84575138c38e3ce964edc5 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Mon, 10 Dec 2018 16:41:20 +0000 Subject: Fail gracefully in the face of a corrupted thread. --- telem.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'telem.lua') diff --git a/telem.lua b/telem.lua index 0bd6cb3..f4aec34 100755 --- a/telem.lua +++ b/telem.lua @@ -426,6 +426,10 @@ function do_type() end current_thread = current_board_threads[thread_id] current_thread_posts = get_posts(current_thread) + if current_thread == nil or #current_thread_posts == 0 then + print("This thread appears corrupted! Aborting.") + return + end current_post_index = #current_thread_posts do_type_show_post() dispatch_loop(type_dispatch, "d", -- cgit v1.2.3