From d97af3e024253910cd60350e0504ea64711fbb00 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Thu, 21 Jan 2010 21:19:31 -0800 Subject: [PATCH 1/1] Add a warning to catch possible refcounting bugs. Not actually needed (was added to track down the corruption fixed in the last changeset, which was unrelated), but probably worth keeping around. --- bluesky/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bluesky/util.c b/bluesky/util.c index eab6a14..2e6f0aa 100644 --- a/bluesky/util.c +++ b/bluesky/util.c @@ -108,6 +108,8 @@ void bluesky_string_resize(BlueSkyRCStr *string, gsize len) if (string->len == len) return; + g_warn_if_fail(string->refcount == 1); + string->data = g_realloc(string->data, len); string->len = len; } -- 2.20.1