diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-03-14 23:01:43 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-06-17 20:31:44 +0500 |
commit | 2cfb529201dec2af5f65713262cdc10018928e03 (patch) | |
tree | 977386d6d99256d5ad6275126cae9b36d4448b67 | |
parent | be2f22b3789b5122b9522672d6e0cdc5a411e51a (diff) |
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 <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | vcl/win/window/salframe.cxx | 10 |
1 files 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<sal_Int16>(LOWORD(lParam)))); - assert(IsIconic(hWnd) || (pFrame->maGeometry.y() == static_cast<sal_Int16>(HIWORD(lParam)))); + SAL_WARN_IF(!IsIconic(hWnd) && pFrame->maGeometry.x() != static_cast<sal_Int16>(LOWORD(lParam)), + "vcl", + "Unexpected X: " << pFrame->maGeometry.x() << " instead of " + << static_cast<sal_Int16>(LOWORD(lParam))); + SAL_WARN_IF(!IsIconic(hWnd) && pFrame->maGeometry.y() != static_cast<sal_Int16>(HIWORD(lParam)), + "vcl", + "Unexpected Y: " << pFrame->maGeometry.y() << " instead of " + << static_cast<sal_Int16>(HIWORD(lParam))); if (GetWindowStyle(hWnd) & WS_VISIBLE) pFrame->mbDefPos = false; |