summaryrefslogtreecommitdiff
path: root/yjit_iface.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-03-11 11:19:02 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:31 -0400
commitcf011b66761cb942899110117f56001e849733da (patch)
treee96d883fe17ec06a99ed4a3a35f5eb1c0778b32d /yjit_iface.c
parentc6156e511338450db2f39abc45e1ee1b5508bd6b (diff)
downloadruby-cf011b66761cb942899110117f56001e849733da.tar.gz
Check for null
Sometimes you bop before you init, you know?
Diffstat (limited to 'yjit_iface.c')
-rw-r--r--yjit_iface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/yjit_iface.c b/yjit_iface.c
index 6424d34938..c29b4d8e81 100644
--- a/yjit_iface.c
+++ b/yjit_iface.c
@@ -472,7 +472,9 @@ block_invalidation_iterator(st_data_t key, st_data_t value, st_data_t data) {
void
rb_yjit_bop_redefined(VALUE klass, const rb_method_entry_t *me, enum ruby_basic_operators bop)
{
- st_foreach(blocks_assuming_bops, block_invalidation_iterator, 0);
+ if (blocks_assuming_bops) {
+ st_foreach(blocks_assuming_bops, block_invalidation_iterator, 0);
+ }
}
/* Called when the constant state changes */