mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
message: Don't pass a NULL debug string to g_utf8_validate()
g_utf8_validate() crashes on NULL, but NULL is valid for the debug string nonetheless.
This commit is contained in:
parent
e68c071bf0
commit
37a9b02391
1 changed files with 3 additions and 3 deletions
|
@ -415,7 +415,7 @@ gst_message_new_error_with_details (GstObject * src, GError * error,
|
|||
GstMessage *message;
|
||||
GstStructure *structure;
|
||||
|
||||
if (!g_utf8_validate (debug, -1, NULL)) {
|
||||
if (debug && !g_utf8_validate (debug, -1, NULL)) {
|
||||
debug = NULL;
|
||||
g_warning ("Trying to set debug field of error message, but "
|
||||
"string is not valid UTF-8. Please file a bug.");
|
||||
|
@ -507,7 +507,7 @@ gst_message_new_warning_with_details (GstObject * src, GError * error,
|
|||
GstMessage *message;
|
||||
GstStructure *structure;
|
||||
|
||||
if (!g_utf8_validate (debug, -1, NULL)) {
|
||||
if (debug && !g_utf8_validate (debug, -1, NULL)) {
|
||||
debug = NULL;
|
||||
g_warning ("Trying to set debug field of warning message, but "
|
||||
"string is not valid UTF-8. Please file a bug.");
|
||||
|
@ -597,7 +597,7 @@ gst_message_new_info_with_details (GstObject * src, GError * error,
|
|||
GstMessage *message;
|
||||
GstStructure *structure;
|
||||
|
||||
if (!g_utf8_validate (debug, -1, NULL)) {
|
||||
if (debug && !g_utf8_validate (debug, -1, NULL)) {
|
||||
debug = NULL;
|
||||
g_warning ("Trying to set debug field of info message, but "
|
||||
"string is not valid UTF-8. Please file a bug.");
|
||||
|
|
Loading…
Reference in a new issue