]> jfr.im git - irc/weechat/weechat.git/commitdiff
ruby: fix use of NULL variable when displaying exception
authorSébastien Helleu <redacted>
Mon, 30 Oct 2023 07:29:55 +0000 (08:29 +0100)
committerSébastien Helleu <redacted>
Mon, 30 Oct 2023 07:38:44 +0000 (08:38 +0100)
ChangeLog.adoc
src/plugins/ruby/weechat-ruby.c

index acae24bad2869b016484511ef89c11f8bb375ba5..f18f72be6286c0c22056a8b4ca17f76dd697610e 100644 (file)
@@ -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::
 
index 391d0d23606f6beaba81a6742e99cc6fd753ef6c..8e43b94fba3b162a5edc7ad51919895a0a05faf2 100644 (file)
@@ -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,