From 2cfb529201dec2af5f65713262cdc10018928e03 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 14 Mar 2024 23:01:43 +0500 Subject: Convert an assert into a warning Seen in an external script calling XSystemChildFactory::createSystemChild. Change-Id: Ib0fd8ef395700a22e96551ca39aa0ef6dfb21242 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164842 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski --- vcl/win/window/salframe.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index bd93ad6bf432..afbf23e36d3a 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -4256,8 +4256,14 @@ static void ImplHandleMoveMsg(HWND hWnd, LPARAM lParam) #ifdef NDEBUG (void) lParam; #endif - assert(IsIconic(hWnd) || (pFrame->maGeometry.x() == static_cast(LOWORD(lParam)))); - assert(IsIconic(hWnd) || (pFrame->maGeometry.y() == static_cast(HIWORD(lParam)))); + SAL_WARN_IF(!IsIconic(hWnd) && pFrame->maGeometry.x() != static_cast(LOWORD(lParam)), + "vcl", + "Unexpected X: " << pFrame->maGeometry.x() << " instead of " + << static_cast(LOWORD(lParam))); + SAL_WARN_IF(!IsIconic(hWnd) && pFrame->maGeometry.y() != static_cast(HIWORD(lParam)), + "vcl", + "Unexpected Y: " << pFrame->maGeometry.y() << " instead of " + << static_cast(HIWORD(lParam))); if (GetWindowStyle(hWnd) & WS_VISIBLE) pFrame->mbDefPos = false; -- cgit