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:
@@ -14,6 +14,6 @@ namespace NTwain
|
||||
// keep this same in majors releases
|
||||
public const string Release = "2.0.0.0";
|
||||
// change this for each nuget release
|
||||
public const string Build = "2.0.3";
|
||||
public const string Build = "2.0.4";
|
||||
}
|
||||
}
|
@@ -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