mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
srt: assert instead of segfault when passing no error to ERROR_TO_WARNING
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4524>
This commit is contained in:
parent
3a5510f61c
commit
5a7ed3c89d
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ GST_DEBUG_CATEGORY_EXTERN (gst_debug_srtobject);
|
|||
|
||||
#define ERROR_TO_WARNING(srtobject, error, suffix) \
|
||||
G_STMT_START { \
|
||||
gchar *text = g_strdup_printf ("%s%s", (error)->message, (suffix)); \
|
||||
gchar *text; \
|
||||
g_assert (error); \
|
||||
text = g_strdup_printf ("%s%s", (error)->message, (suffix)); \
|
||||
GST_WARNING_OBJECT ((srtobject)->element, "warning: %s", text); \
|
||||
gst_element_message_full ((srtobject)->element, GST_MESSAGE_WARNING, \
|
||||
(error)->domain, (error)->code, text, NULL, __FILE__, GST_FUNCTION, \
|
||||
|
|
Loading…
Reference in a new issue