From df99b3aa90cda1670b0a463efd8dc4eceb3219c0 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 17 Jun 2024 21:23:48 -0400 Subject: [PATCH] Trying to catch an issue I think I saw in the debugger. --- src/ssb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)