Skip to content

Commit 57857b7

Browse files
committed
MAVFtp: fix locker static
1 parent 77b9c30 commit 57857b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ExtLibs/ArduPilot/Mavlink/MAVFtp.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public MAVFtp(MAVLinkInterface mavint, byte sysid, byte compid)
4646
_sysid = sysid;
4747
_compid = compid;
4848

49-
locker[(sysid, compid)] = new object();
49+
if (!locker.ContainsKey((sysid, compid)))
50+
locker[(sysid, compid)] = new object();
5051
}
5152

5253
public enum errno

0 commit comments

Comments
 (0)