mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-21 12:35:22 -04:00
add set nullptr before uicontent destroy
Signed-off-by: zcdqs <junfeng.lijunfeng@huawei.com> Change-Id: I968162916966e6e43b3dba400eaf2130b7c25dbf
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user