mirror of
https://github.com/go-gst/go-gst.git
synced 2025-09-26 20:11:18 +08:00
Merge pull request #143 from chrbsg/fix-session-description-null-ptr-marshal
webrtc: fix nil deref marshal *SessionDescription
This commit is contained in:
@@ -104,7 +104,11 @@ func (sd *SessionDescription) ToGValue() (*glib.Value, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
val.SetBoxed(unsafe.Pointer(sd.ptr))
|
||||
var ptr *C.GstWebRTCSessionDescription
|
||||
if sd != nil {
|
||||
ptr = sd.ptr
|
||||
}
|
||||
val.SetBoxed(unsafe.Pointer(ptr))
|
||||
return val, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user