fftools/graph/graphprint: Replace always-false check by assert

This check makes no sense, as the pointer arithmetic involved
in &fg->graph_print_buf would be UB if fg were NULL.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-01-04 11:14:03 +01:00
parent 9f77cb3a98
commit d595a18287

View File

@@ -946,16 +946,13 @@ fail:
int print_filtergraph(FilterGraph *fg, AVFilterGraph *graph)
{
av_assert2(fg);
GraphPrintContext *gpc = NULL;
AVTextFormatContext *tfc;
AVBPrint *target_buf = &fg->graph_print_buf;
int ret;
if (!fg) {
av_log(NULL, AV_LOG_ERROR, "Invalid filter graph provided\n");
return AVERROR(EINVAL);
}
if (target_buf->len)
av_bprint_finalize(target_buf, NULL);