fix ToGValue for nil structures

This commit is contained in:
RSWilli
2024-12-09 09:15:27 +01:00
parent b36979a5b8
commit b9dce0b926

View File

@@ -202,10 +202,13 @@ func (s *Structure) ToGValue() (*glib.Value, error) {
return nil, err return nil, err
} }
C.gst_value_set_structure( if s != nil {
(*C.GValue)(unsafe.Pointer(val.GValue)), C.gst_value_set_structure(
s.copy(), (*C.GValue)(unsafe.Pointer(val.GValue)),
) s.copy(),
)
}
return val, nil return val, nil
} }