mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-19 17:08:11 -04:00
!15 fix uicontent use after release
Merge pull request !15 from 邢亚楠/release32
This commit is contained in:
@@ -294,6 +294,7 @@ private:
|
||||
}
|
||||
inline void NotifyBeforeDestroy(std::string windowName)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
if (uiContent_ != nullptr) {
|
||||
auto uiContent = std::move(uiContent_);
|
||||
uiContent_ = nullptr;
|
||||
|
||||
@@ -1839,7 +1839,11 @@ void WindowImpl::UpdateRect(const struct Rect& rect, bool decoStatus, WindowSize
|
||||
WLOGFD("sizeChange callback size: %{public}lu", (unsigned long)windowChangeListeners_.size());
|
||||
|
||||
NotifySizeChange(rectToAce, reason);
|
||||
if (uiContent_ != nullptr) {
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
if (uiContent_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
Ace::ViewportConfig config;
|
||||
WLOGFI("UpdateViewportConfig Id:%{public}u, windowRect:[%{public}d, %{public}d, %{public}u, %{public}u]",
|
||||
property_->GetWindowId(), rectToAce.posX_, rectToAce.posY_, rectToAce.width_, rectToAce.height_);
|
||||
|
||||
Reference in New Issue
Block a user