Skip to content

Commit

Permalink
Fixed small bug with camera disconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
Rambalac committed Apr 13, 2017
1 parent db41fb3 commit 926f39f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Core/Camera/LumixManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ private void Camera_Disconnected(Lumix obj, bool stillAvailable)
foundDevices.Remove(usn + host);
Debug.WriteLine("Undiscovered: " + usn, "Discovery");
}
Debug.WriteLine("Remove listener: " + host, "UDP");

Debug.WriteLine("Remove listener: " + host, "UDP");
}
else
{
Expand Down
6 changes: 5 additions & 1 deletion GMaster/Views/Commands/CameraDisconnectCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ public class CameraDisconnectCommand : AbstractParameterModelCommand<MainPageMod

protected override async Task InternalExecute(ConnectedCamera parameter)
{
await parameter.Camera.Disconnect();
var camera = parameter.Camera;
if (camera != null)
{
await camera.Disconnect();
}
}
}
}

0 comments on commit 926f39f

Please sign in to comment.