From 10e5e570bab66a6cd543c857b26c576795eb240f Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Thu, 12 Aug 2010 12:44:02 -0700 Subject: Fix field packer bug for U32 data. Fix initial refcounts in allocations. Support null references in allocations. Change-Id: Ifba6406ba750e69737bd77fa7df5d7fb8e27a5b4 --- rsElement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rsElement.cpp') diff --git a/rsElement.cpp b/rsElement.cpp index 5dee1fb0..2602dd4d 100644 --- a/rsElement.cpp +++ b/rsElement.cpp @@ -266,7 +266,7 @@ void Element::incRefs(const void *ptr) const if (mComponent.isReference()) { ObjectBase *const*obp = static_cast(ptr); ObjectBase *ob = obp[0]; - ob->incSysRef(); + if (ob) ob->incSysRef(); } return; } @@ -285,7 +285,7 @@ void Element::decRefs(const void *ptr) const if (mComponent.isReference()) { ObjectBase *const*obp = static_cast(ptr); ObjectBase *ob = obp[0]; - ob->decSysRef(); + if (ob) ob->decSysRef(); } return; } -- cgit v1.2.3