From 93a07a24498aacc03aff6fd3071658e4b9c7a973 Mon Sep 17 00:00:00 2001 From: Benjamin Wrensch Date: Mon, 29 Jul 2024 15:15:26 +0200 Subject: [PATCH] [fix] make oidn denoiser unavailable if oidn library is not available --- .../denoiser_oidn_plugin/denoiser_oidn_plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iolite_plugins/denoiser_oidn_plugin/denoiser_oidn_plugin.cpp b/iolite_plugins/denoiser_oidn_plugin/denoiser_oidn_plugin.cpp index bcb8a09..3a483d4 100644 --- a/iolite_plugins/denoiser_oidn_plugin/denoiser_oidn_plugin.cpp +++ b/iolite_plugins/denoiser_oidn_plugin/denoiser_oidn_plugin.cpp @@ -241,6 +241,13 @@ IO_API_EXPORT int IO_API_CALL load_plugin(void* api_manager) io_logging = (const io_logging_i*)io_api_manager->find_first(IO_LOGGING_API_NAME); + if (!load_oidn()) + { + // Unsupported if OIDN is not available + return -1; + } + unload_oidn(); + // Register the interfaces we provide { io_user_denoiser.get_name = get_name;