Skip to content

Commit

Permalink
Merge pull request go-gst#124 from NoobsEnslaver/nil-pointer-meta-fix
Browse files Browse the repository at this point in the history
add nil check for GetNetAddressMeta
  • Loading branch information
RSWilli authored Sep 4, 2024
2 parents 24b4752 + f602188 commit 49f720b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gst/gstnet/net_address_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ func AddNetAddressMeta(buffer *gst.Buffer, address string, port int) *NetAddress
// GetNetAddressMeta retrieves the NetAddressMeta from the given buffer.
func GetNetAddressMeta(buffer *gst.Buffer) *NetAddressMeta {
meta := C.gst_buffer_get_net_address_meta((*C.GstBuffer)(unsafe.Pointer(buffer.Instance())))
if meta == nil {
return nil
}
return &NetAddressMeta{meta}
}

Expand Down

0 comments on commit 49f720b

Please sign in to comment.