mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
spell: check buffer pointer received in info "spell_dict"
This commit is contained in:
@@ -54,6 +54,7 @@ Bug fixes::
|
||||
* buflist: do not display keys added in default context on first load
|
||||
* fset: remove scroll to top of fset buffer when options are added or removed (issue #1892)
|
||||
* irc: fix join of channels in "autojoin" server option on first connection to server if auto reconnection is performed (issue #1873)
|
||||
* spell: check buffer pointer received in info "spell_dict"
|
||||
* typing: fix crash when pointer buffer is not received in callback for signal "input_text_changed" (issue #1869)
|
||||
|
||||
Tests::
|
||||
|
||||
@@ -55,10 +55,11 @@ spell_info_info_spell_dict_cb (const void *pointer, void *data,
|
||||
if (strncmp (arguments, "0x", 2) == 0)
|
||||
{
|
||||
rc = sscanf (arguments, "%lx", &value);
|
||||
if ((rc != EOF) && (rc != 0))
|
||||
if ((rc != EOF) && (rc != 0) && value)
|
||||
{
|
||||
buffer = (struct t_gui_buffer *)value;
|
||||
if (buffer)
|
||||
if (weechat_hdata_check_pointer (weechat_hdata_get ("buffer"),
|
||||
NULL, buffer))
|
||||
{
|
||||
buffer_full_name = weechat_buffer_get_string (buffer,
|
||||
"full_name");
|
||||
@@ -66,7 +67,9 @@ spell_info_info_spell_dict_cb (const void *pointer, void *data,
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer_full_name = arguments;
|
||||
}
|
||||
|
||||
if (buffer_full_name)
|
||||
ptr_dict = spell_get_dict_with_buffer_name (buffer_full_name);
|
||||
|
||||
Reference in New Issue
Block a user