[Commits] [SCM] claws branch, master, updated. 3.17.0-122-g36461c0
Colin
colin at claws-mail.org
Wed Oct 17 09:27:12 CEST 2018
The branch, master has been updated
via 36461c0703e2464c0ada230c62d85709dd8a91cf (commit)
from ff80e86cbd9340c0368b6094e060d55bbc97cae2 (commit)
Summary of changes:
src/compose.c | 1 +
src/message_search.c | 11 +++++++++++
src/message_search.h | 1 +
src/messageview.c | 2 ++
4 files changed, 15 insertions(+)
- Log -----------------------------------------------------------------
commit 36461c0703e2464c0ada230c62d85709dd8a91cf
Author: Colin Leroy <colin at colino.net>
Date: Wed Oct 17 09:26:26 2018 +0200
Fix crash in dangling message search.
diff --git a/src/compose.c b/src/compose.c
index 0d8f774..11e0b6e 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -9160,6 +9160,7 @@ static void compose_destroy(Compose *compose)
clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
gtk_text_buffer_remove_selection_clipboard(buffer, clipboard);
+ message_search_close(compose);
gtk_widget_destroy(compose->window);
toolbar_destroy(compose->toolbar);
g_free(compose->toolbar);
diff --git a/src/message_search.c b/src/message_search.c
index 1f50a22..e73fe87 100644
--- a/src/message_search.c
+++ b/src/message_search.c
@@ -122,6 +122,17 @@ void message_search_compose(Compose *compose)
message_search_other(&compose_interface, (void *)compose);
}
+void message_search_close (void *obj)
+{
+ if(!search_window.window) {
+ return;
+ }
+ if (search_window.interface_obj == obj) {
+ gtk_widget_hide(search_window.window);
+ search_window.interface_obj = NULL;
+ }
+}
+
void message_search_other(SearchInterface *interface, void *obj)
{
if (!search_window.window)
diff --git a/src/message_search.h b/src/message_search.h
index e6ab436..b5218bf 100644
--- a/src/message_search.h
+++ b/src/message_search.h
@@ -38,5 +38,6 @@ typedef struct {
void message_search (MessageView *messageview);
void message_search_compose (Compose *compose);
void message_search_other (SearchInterface *source, void *obj);
+void message_search_close (void *obj);
#endif /* __MESSAGE_SEARCH_H__ */
diff --git a/src/messageview.c b/src/messageview.c
index 829f158..fe9767d 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -1637,6 +1637,8 @@ void messageview_destroy(MessageView *messageview)
g_free(messageview->toolbar);
}
+ message_search_close(messageview);
+
list_free_strings_full(messageview->trail);
msgview_list = g_list_remove(msgview_list, messageview);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list