aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2018-12-10 16:41:20 +0000
committerSolderpunk <solderpunk@sdf.org>2018-12-10 16:41:20 +0000
commitf903f18b8a639bc80f84575138c38e3ce964edc5 (patch)
tree3b85eeca50a36292b0699f7f8b1a8d045652d702
parentYet more permission fiddling. (diff)
Fail gracefully in the face of a corrupted thread.
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",