Fix crash in rtmpDataPackets

This commit is contained in:
Josh Deprez 2024-05-04 16:16:17 +10:00
parent 298ae0935f
commit d1ab38b266
Signed by: josh
SSH key fingerprint: SHA256:zZji7w1Ilh2RuUpbQcqkLPrqmRwpiCSycbF2EfKm6Kw

View file

@ -211,7 +211,7 @@ func (port *EtherTalkPort) rtmpDataPackets(splitHorizon bool) []*rtmp.DataPacket
// (It's manually set as the first tuple anyway.)
continue
}
if splitHorizon && rt.EtherTalkPeer.Port == port {
if splitHorizon && rt.EtherTalkPeer != nil && rt.EtherTalkPeer.Port == port {
// If the route is through a peer accessible on this port, don't
// include it.
continue