Skip to content

Commit cf6551d

Browse files
authored
fix: OH_Drawing_CanvasDestroy method exception (#51)
Signed-off-by: tyBrave <tianyong21@h-partners.com>
1 parent a4a2ad2 commit cf6551d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

harmony/smart_refresh_layout/src/main/cpp/RNCStoreHouseHeaderNode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ RNCStoreHouseHeaderNode::~RNCStoreHouseHeaderNode() {
5353
NativeNodeApi::getInstance()->unregisterNodeCustomEvent(m_nodeHandle, ARKUI_NODE_CUSTOM_EVENT_ON_MEASURE);
5454
NativeNodeApi::getInstance()->unregisterNodeCustomEvent(m_nodeHandle, ARKUI_NODE_CUSTOM_EVENT_ON_DRAW);
5555
OH_Drawing_MatrixDestroy(mMatrix);
56-
OH_Drawing_CanvasDestroy(canvas);
5756
mItemList.clear();
5857
delete canvasCallback_;
5958
canvasCallback_ = nullptr;
59+
canvas = nullptr;
60+
mMatrix = nullptr;
6061
}
6162
void RNCStoreHouseHeaderNode::setStoreHouseNodeDelegate(StoreHouseNodeDelegate *storeHouseNodeDelegate) {
6263
delegate = storeHouseNodeDelegate;

0 commit comments

Comments
 (0)