summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2021-01-05 10:06:40 -0300
committerThibault Saunier <tsaunier@igalia.com>2021-01-05 11:33:51 -0300
commit73a674ac2d737a7a631914b48375681de884ecbc (patch)
tree6e1beb1e40ebb5bfb10ffd61fbd549b7119f70bb
parentf47e5b163f6638c40559fbed2c43ecd401919135 (diff)
validate: Do not check strv length on NULL pointers
This is not legal Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/234>
-rw-r--r--validate/gst/validate/gst-validate-scenario.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c
index bc7586b..9e84c5d 100644
--- a/validate/gst/validate/gst-validate-scenario.c
+++ b/validate/gst/validate/gst-validate-scenario.c
@@ -4433,7 +4433,7 @@ gst_validate_scenario_get_include_paths (const gchar * relative_scenario)
0) : NULL;
g_free (scenarios_path);
- n = g_strv_length (env_scenariodir);
+ n = env_scenariodir ? g_strv_length (env_scenariodir) : 0;
env_scenariodir = g_realloc_n (env_scenariodir, n + 3, sizeof (gchar *));
env_scenariodir[n] = g_build_filename (g_get_user_data_dir (),
"gstreamer-" GST_API_VERSION, "validate",