From cbb5d22850230e025c95b4836d2103aa0dfbd1a7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Mar 2024 09:54:43 -0400 Subject: Fix potential use of null pointer in test plugin --- test/test_plugin.lv2/test_plugin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_plugin.lv2/test_plugin.c b/test/test_plugin.lv2/test_plugin.c index 81a6433..cb89136 100644 --- a/test/test_plugin.lv2/test_plugin.c +++ b/test/test_plugin.lv2/test_plugin.c @@ -148,8 +148,9 @@ instantiate(const LV2_Descriptor* descriptor, test->rec_file_path = make_path->path(make_path->handle, "recfile"); if (!(test->rec_file = fopen(test->rec_file_path, "w"))) { fprintf(stderr, "ERROR: Failed to open rec file\n"); + } else { + fprintf(test->rec_file, "instantiate\n"); } - fprintf(test->rec_file, "instantiate\n"); } return (LV2_Handle)test; -- cgit v1.2.1