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;