Skip to content

Commit 0f200b3

Browse files
committed
STEVE - safely release
1 parent 873f268 commit 0f200b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos/base/CCVector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ class Vector
481481
CCASSERT(index >= 0 && index < size(), "Invalid index!");
482482
CCASSERT(object != nullptr, "The object should not be nullptr");
483483

484-
_data[index]->release();
484+
CC_SAFE_RELEASE(_data[index]);
485485
_data[index] = object;
486486
object->retain();
487487
}

0 commit comments

Comments
 (0)