From d156b75c541f4dfd60d98a3b56e6785165576873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=AE=89=E5=85=89?= Date: Fri, 29 Aug 2025 14:45:54 +0800 Subject: [PATCH] fix(wms-layout): fix ani reisze method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘安光 --- .../ani/window_runtime/window_stage_ani/src/ani_window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window.cpp b/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window.cpp index 277d838913..301d7fa09f 100644 --- a/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window.cpp +++ b/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window.cpp @@ -1564,7 +1564,10 @@ void AniWindow::Resize(ani_env* env, ani_int width, ani_int height) AniWindowUtils::AniThrowError(env, WmErrorCode::WM_ERROR_STATE_ABNORMALLY); return; } - + if (width <= 0 || height <= 0) { + AniWindowUtils::AniThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); + return; + } const uint32_t w = static_cast(width); const uint32_t h = static_cast(height); const WMError ret = windowToken_->Resize(w, h); -- Gitee