gst: provider: Fix crash in finalize
Both the DeviceProvider and Device classes had the same mistake, calling G_OBJECT_GET_CLASS() instead of G_OBJECT_CLASS() when chaining their finalize call to their base class. This would crash at destruction, which was causing gst-device-monitor-1.0 tool to crash and application using that API to crash too. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
e32d33b11d
commit
488bbe40a9
@@ -101,7 +101,7 @@ gst_libcamera_device_finalize(GObject *object)
|
||||
|
||||
g_free(self->name);
|
||||
|
||||
G_OBJECT_GET_CLASS(klass)->finalize(object);
|
||||
G_OBJECT_CLASS(klass)->finalize(object);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -218,7 +218,7 @@ gst_libcamera_provider_finalize(GObject *object)
|
||||
|
||||
delete self->cm;
|
||||
|
||||
return G_OBJECT_GET_CLASS(klass)->finalize(object);
|
||||
return G_OBJECT_CLASS(klass)->finalize(object);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user