mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-19 01:57:56 +08:00
Small null ref fix in ForceStepDown.
This commit is contained in:
@@ -524,15 +524,15 @@ namespace NTwain
|
||||
|
||||
_msgLoopHook.Invoke(() =>
|
||||
{
|
||||
if (targetState < 7)
|
||||
if (targetState < 7 && CurrentSource != null)
|
||||
{
|
||||
((ITwainSessionInternal)this).DGControl.PendingXfers.EndXfer(new TWPendingXfers());
|
||||
}
|
||||
if (targetState < 6)
|
||||
if (targetState < 6 && CurrentSource != null)
|
||||
{
|
||||
((ITwainSessionInternal)this).DGControl.PendingXfers.Reset(new TWPendingXfers());
|
||||
}
|
||||
if (targetState < 5)
|
||||
if (targetState < 5 && CurrentSource != null)
|
||||
{
|
||||
((ITwainSessionInternal)this).DisableSource();
|
||||
}
|
||||
|
Reference in New Issue
Block a user