解决选择设备时点击取消,弹窗提示异常的问题
This commit is contained in:
parent
5440f484be
commit
14a82589ca
|
@ -262,7 +262,7 @@ HGResult DeviceUser::Open()
|
|||
{
|
||||
HGChar errInfo[256];
|
||||
HGResult ret = HGSane_OpenSelectedDevice(m_source, m_wnd, &m_saneDev, errInfo, 256);
|
||||
if (HGBASE_ERR_OK != ret)
|
||||
if (HGBASE_ERR_OK != ret && strlen(errInfo) != 0)
|
||||
{
|
||||
QMessageBox::information(m_wnd, tr("Prompt"), errInfo);
|
||||
}
|
||||
|
|
|
@ -558,6 +558,7 @@ HGResult HGSaneSourceImpl::OpenSelectedDevice(HGWindow parent, class HGSaneDevic
|
|||
int id = choose_scanner(devs);
|
||||
if (-1 == id)
|
||||
{
|
||||
memset(errInfo, 0, sizeof(errInfo));
|
||||
return HGSANE_ERR_FAIL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue