diff --git a/subprojects/gstreamer/gst/gstinfo.c b/subprojects/gstreamer/gst/gstinfo.c index d11c558be6..bb5979c34e 100644 --- a/subprojects/gstreamer/gst/gstinfo.c +++ b/subprojects/gstreamer/gst/gstinfo.c @@ -2942,7 +2942,6 @@ generate_backtrace_trace (void) char **strings; GString *trace; - trace = g_string_new (NULL); nptrs = backtrace (buffer, BT_BUF_SIZE); strings = backtrace_symbols (buffer, nptrs); @@ -2950,6 +2949,8 @@ generate_backtrace_trace (void) if (!strings) return NULL; + trace = g_string_new (NULL); + for (j = 0; j < nptrs; j++) g_string_append_printf (trace, "%s\n", strings[j]);