aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtelem.lua4
1 files changed, 4 insertions, 0 deletions
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",