diff --git a/hgdriver/hgdev/hg_scanner.cpp b/hgdriver/hgdev/hg_scanner.cpp index 670327f..7282733 100644 --- a/hgdriver/hgdev/hg_scanner.cpp +++ b/hgdriver/hgdev/hg_scanner.cpp @@ -347,12 +347,15 @@ void hg_scanner::thread_devslock_handle(void) } void hg_scanner::thread_read_int(void) { - wait_read_int.wait(); - is_read_int = true; - notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING, SANE_EVENT_STATUS, status_); - discard_all_images(); - is_read_int = false; - notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_START_SUCCES, SANE_EVENT_STATUS, status_); + if (run_) + { + wait_read_int.wait(); + is_read_int = true; + notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING, SANE_EVENT_STATUS, status_); + discard_all_images(); + is_read_int = false; + notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_START_SUCCES, SANE_EVENT_STATUS, status_); + } } void hg_scanner::thread_handle_usb(void) {