add set nullptr before uicontent destroy

Signed-off-by: zcdqs <junfeng.lijunfeng@huawei.com>
Change-Id: I968162916966e6e43b3dba400eaf2130b7c25dbf
This commit is contained in:
zcdqs
2022-06-24 12:38:23 +08:00
parent f8f4a6157e
commit 3c5b6d2241
+5 -1
View File
@@ -253,7 +253,11 @@ private:
}
inline void NotifyBeforeDestroy(std::string windowName)
{
CALL_UI_CONTENT(Destroy);
if (uiContent_ != nullptr) {
auto uiContent = std::move(uiContent_);
uiContent_ = nullptr;
uiContent->Destroy();
}
if (notifyNativefunc_) {
notifyNativefunc_(windowName);
}