1
0
Fork 0

- prevented a crash if an invalid regular expression is used

when searching in a message window.
This commit is contained in:
cage 2020-07-17 20:24:25 +02:00
parent 63f12331c6
commit 133ac1a48d
1 changed files with 7 additions and 1 deletions

View File

@ -378,7 +378,13 @@
(defmethod process-event ((object search-regex-message-content-event))
(let ((regexp (payload object)))
(message-window:search-regex specials:*message-window* regexp)))
(when (text-utils:string-not-empty-p regexp)
(handler-case
(progn
(cl-ppcre:create-scanner regexp)
(message-window:search-regex specials:*message-window* regexp))
(error ()
(ui:error-message (_ "Invalid regular expression")))))))
(defclass thread-goto-message (program-event) ())