dbus_message_unref: make an assertion more strict
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 23 Jun 2011 12:38:31 +0000 (13:38 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 25 Jul 2011 17:09:29 +0000 (18:09 +0100)
We've just decremented the refcount, so it should have been at least 1
before we did that.

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

dbus/dbus-message.c

index a59ed9b..d62529c 100644 (file)
@@ -1549,7 +1549,7 @@ dbus_message_unref (DBusMessage *message)
 
   old_refcount = _dbus_atomic_dec (&message->refcount);
 
-  _dbus_assert (old_refcount >= 0);
+  _dbus_assert (old_refcount >= 1);
 
   if (old_refcount == 1)
     {