diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-30 08:29:55 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-30 08:38:44 +0100 |
commit | 1a5ff442cbc0877f5726966ce2984a965d894dc6 (patch) | |
tree | a75b600c52c69c27e42cd7dff7da99709cb13080 | |
parent | 21759171d27d66dcb6dbb96950ac55471d6604a7 (diff) | |
download | weechat-1a5ff442cbc0877f5726966ce2984a965d894dc6.zip |
ruby: fix use of NULL variable when displaying exception
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/plugins/ruby/weechat-ruby.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index acae24bad..f18f72be6 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -26,6 +26,7 @@ Bug fixes:: * core: fix crash when a custom bar item name is already used by a default bar item (issue #2034) * core: fix random timeouts when a lot of concurrent processes are launched with hook_process (issue #2033) * irc: revert compute of nick colors to case sensitive way, deprecate again infos "irc_nick_color" and "irc_nick_color_name" (issue #194, issue #2032) + * ruby: fix use of NULL variable when displaying exception Build:: diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c index 391d0d236..8e43b94fb 100644 --- a/src/plugins/ruby/weechat-ruby.c +++ b/src/plugins/ruby/weechat-ruby.c @@ -287,7 +287,7 @@ weechat_ruby_print_exception (VALUE err) err_class = StringValuePtr (class_name); } - if (strcmp (err_class, "SyntaxError") == 0) + if (err_class && (strcmp (err_class, "SyntaxError") == 0)) { tmp3 = rb_inspect (err); weechat_printf (NULL, |