diff --git a/src/ssb.c b/src/ssb.c index 7f9e851d..1362780a 100644 --- a/src/ssb.c +++ b/src/ssb.c @@ -3760,7 +3760,12 @@ void tf_ssb_ref(tf_ssb_t* ssb) void tf_ssb_unref(tf_ssb_t* ssb) { - ssb->ref_count--; + int new_count = --ssb->ref_count; + if (new_count < 0) + { + tf_printf("tf_ssb_unref past 0: %d\n", new_count); + abort(); + } } void tf_ssb_set_main_thread(tf_ssb_t* ssb, bool main_thread)