From 3a6abca1e607df72209fa43c37210603a0c13343 Mon Sep 17 00:00:00 2001 From: Mike Oliphant Date: Mon, 10 Apr 2023 10:17:19 -0700 Subject: [PATCH] lv2 error on failed model load --- src/nam_plugin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nam_plugin.cpp b/src/nam_plugin.cpp index df029f4..ea18229 100644 --- a/src/nam_plugin.cpp +++ b/src/nam_plugin.cpp @@ -64,12 +64,11 @@ namespace NAM { switch (*((const uint32_t*)data)) { case kWorkTypeLoad: + auto msg = reinterpret_cast(data); + auto nam = static_cast(instance); + try { - auto msg = reinterpret_cast(data); - - auto nam = static_cast(instance); - // If we had a previous model, delete it if (nam->deleteModel) { @@ -88,6 +87,7 @@ namespace NAM { } catch (std::exception& e) { + lv2_log_error(&nam->logger, "Unable to load model from: '%s'\n", msg->path); } break;