mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-04 15:42:52 +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 {
|
if err != nil {
|
||||||
return nil, err
|
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
|
return val, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user