From 546699c3827f6030d80a83f764b68fa4a909c8bb Mon Sep 17 00:00:00 2001 From: Sangjung Woo Date: Mon, 8 Apr 2019 13:54:03 +0900 Subject: [PATCH] [Tizen/API] bugfix when passing a wrong pipeline command If passing a wrong pipeline command such as non-existent element or erroneous pipeline, assertion failure occurs in nns_pipeline_construct(). This is mainly because gst_parse_launch() could return non-NULL even though the error is set. So this patch checks both the return value and GError value. Signed-off-by: Sangjung Woo --- tizen-api/src/tizen-api-pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tizen-api/src/tizen-api-pipeline.c b/tizen-api/src/tizen-api-pipeline.c index 96b80db..37ddee0 100644 --- a/tizen-api/src/tizen-api-pipeline.c +++ b/tizen-api/src/tizen-api-pipeline.c @@ -274,7 +274,7 @@ nns_pipeline_construct (const char *pipeline_description, nns_pipeline_h * pipe) } pipeline = gst_parse_launch (pipeline_description, &err); - if (pipeline == NULL) { + if (pipeline == NULL || err) { if (err) { dlog_print (DLOG_ERROR, DLOG_TAG, "Cannot parse and launch the given pipeline = [%s], %s", -- 2.7.4