From b071d7d4b7e9a2b3743a748c28dce1e5de98016e Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Mon, 11 Dec 2023 15:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=88=96=E8=BF=9B=E5=BA=A6=E6=8C=87=E7=A4=BA?= =?UTF-8?q?=E5=99=A8=E7=88=B6=E7=AA=97=E5=8F=A3=E6=9C=89=E6=95=88=E6=80=A7?= =?UTF-8?q?=E7=9A=84=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sane/scanner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sane/scanner.cpp b/sane/scanner.cpp index 977d893..858db4d 100644 --- a/sane/scanner.cpp +++ b/sane/scanner.cpp @@ -3494,7 +3494,7 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_setting(HWND parent, bool with_scan, bo events_.clear(); ui_notify = std::function(); - if (!IsWindowVisible(parent)) + if (!IsWindow(parent) || !IsWindowVisible(parent)) parent = NULL; if (callback::show_setting_ui) @@ -3592,7 +3592,7 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_progress(HWND parent, bool bIndicator)) is_bIndicator = bIndicator; if (is_bIndicator) ui_notify = std::function(); - if (!IsWindowVisible(parent)) + if (!IsWindow(parent) || !IsWindowVisible(parent)) parent = NULL; auto ui_process = [this](ui_result res)