1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

typing: fix crash when pointer buffer is not received in callback for signal "input_text_changed" (closes #1869)

This commit is contained in:
Sébastien Helleu
2023-01-08 17:38:37 +01:00
parent 43d3a97869
commit f305eed01f
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -18,6 +18,10 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
[[v3.9]]
== Version 3.9 (under dev)
Bug fixes::
* typing: fix crash when pointer buffer is not received in callback for signal "input_text_changed" (issue #1869)
Build::
* core: remove build with autotools (issue #1860)
+6 -1
View File
@@ -94,7 +94,7 @@ typing_buffer_closing_signal_cb (const void *pointer, void *data,
}
/*
* Callback for signal "buffer_closing".
* Callback for signal "input_text_changed".
*/
int
@@ -113,7 +113,12 @@ typing_input_text_changed_signal_cb (const void *pointer, void *data,
(void) signal;
(void) type_data;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_POINTER) != 0)
return WEECHAT_RC_OK;
ptr_buffer = (struct t_gui_buffer *)signal_data;
if (!ptr_buffer)
return WEECHAT_RC_OK;
/* ignore any change in input if the user is searching text in the buffer */
text_search = weechat_buffer_get_integer (ptr_buffer, "text_search");