diff --git a/src/thread-window.lisp b/src/thread-window.lisp index c3d5a9f..cd40783 100644 --- a/src/thread-window.lisp +++ b/src/thread-window.lisp @@ -888,13 +888,14 @@ db:renumber-timeline-message-index." (defun select-messages-corresponding-to-shown () (multiple-value-bind (status-id timeline folder) (get-status-tuple-shown-status *message-window*) - (let ((matching-status (db::find-status-id-folder-timeline status-id - folder - timeline))) - (if matching-status - (let ((new-message-index (db:row-message-index matching-status))) - (rebuild-lines *thread-window* new-message-index)) - (ui:info-message (format nil (_ "No matching post in thread window"))))))) + (when status-id + (let ((matching-status (db::find-status-id-folder-timeline status-id + folder + timeline))) + (if matching-status + (let ((new-message-index (db:row-message-index matching-status))) + (rebuild-lines *thread-window* new-message-index)) + (ui:info-message (format nil (_ "No matching post in thread window")))))))) (defmethod open-message ((object thread-window)) (with-accessors ((row-selected-index row-selected-index)