mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
glbasememory: assert for a valid allocator instead of segfaulting
This commit is contained in:
parent
2c3a31c483
commit
adf47ea728
2 changed files with 3 additions and 1 deletions
|
@ -732,6 +732,8 @@ gst_gl_base_memory_alloc (GstGLBaseMemoryAllocator * allocator,
|
|||
{
|
||||
GstGLBaseMemoryAllocatorClass *alloc_class;
|
||||
|
||||
g_return_val_if_fail (GST_IS_GL_BASE_MEMORY_ALLOCATOR (allocator), NULL);
|
||||
|
||||
alloc_class = GST_GL_BASE_MEMORY_ALLOCATOR_GET_CLASS (allocator);
|
||||
|
||||
g_return_val_if_fail (alloc_class != NULL, NULL);
|
||||
|
|
|
@ -32,7 +32,7 @@ G_BEGIN_DECLS
|
|||
#define GST_TYPE_GL_BASE_MEMORY_ALLOCATOR (gst_gl_base_memory_allocator_get_type())
|
||||
GType gst_gl_base_memory_allocator_get_type(void);
|
||||
|
||||
#define GST_IS_GL_BASE_MEMORY_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_ALLOCATOR))
|
||||
#define GST_IS_GL_BASE_MEMORY_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_BASE_MEMORY_ALLOCATOR))
|
||||
#define GST_IS_GL_BASE_MEMORY_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_BASE_MEMORY_ALLOCATOR))
|
||||
#define GST_GL_BASE_MEMORY_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_BASE_MEMORY_ALLOCATOR, GstGLBaseMemoryAllocatorClass))
|
||||
#define GST_GL_BASE_MEMORY_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_BASE_MEMORY_ALLOCATOR, GstGLBaseMemoryAllocator))
|
||||
|
|
Loading…
Reference in a new issue