diff options
author | David Robillard <d@drobilla.net> | 2024-03-16 09:54:43 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-03-16 09:57:37 -0400 |
commit | cbb5d22850230e025c95b4836d2103aa0dfbd1a7 (patch) | |
tree | ffc68be2ed8fa56f2153819ee32d39c6e95decb2 /test | |
parent | cc394e5f7965111d9ea4ff444c3b7e07be30515c (diff) | |
download | lilv-cbb5d22850230e025c95b4836d2103aa0dfbd1a7.tar.gz lilv-cbb5d22850230e025c95b4836d2103aa0dfbd1a7.tar.bz2 lilv-cbb5d22850230e025c95b4836d2103aa0dfbd1a7.zip |
Fix potential use of null pointer in test plugin
Diffstat (limited to 'test')
-rw-r--r-- | test/test_plugin.lv2/test_plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |