diff --git a/fftools/graph/graphprint.c b/fftools/graph/graphprint.c index 26d2fd381f..9a8c4c4230 100644 --- a/fftools/graph/graphprint.c +++ b/fftools/graph/graphprint.c @@ -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);