Browse Source

Always return a valid string on urid-unmap, special fix for Ingen

Ingen is calling urid-unmap with URID 62465.
There's no way that many URIs have been mapped, so something is weird in Ingen.
Ingen aborts when it receives NULL on urid-unmap (caused by a bad URID),
so as a workaround we'll return a valid but somewhat null URI.
Ingen still needs fixing though.
tags/1.9.6
falkTX 9 years ago
parent
commit
3509edb43d
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      source/bridges-ui/CarlaBridgeUI-LV2.cpp

+ 4
- 3
source/bridges-ui/CarlaBridgeUI-LV2.cpp View File

@@ -654,11 +654,12 @@ public:

const char* getCustomURIDString(const LV2_URID urid) const noexcept
{
CARLA_SAFE_ASSERT_RETURN(urid != CARLA_URI_MAP_ID_NULL, nullptr);
CARLA_SAFE_ASSERT_RETURN(urid < fCustomURIDs.count(), nullptr);
static const char* const sFallback = "urn:null";
CARLA_SAFE_ASSERT_RETURN(urid != CARLA_URI_MAP_ID_NULL, sFallback);
CARLA_SAFE_ASSERT_RETURN(urid < fCustomURIDs.count(), sFallback);
carla_debug("CarlaLv2Client::getCustomURIDString(%i)", urid);

return fCustomURIDs.getAt(urid, nullptr);
return fCustomURIDs.getAt(urid, sFallback);
}

// ---------------------------------------------------------------------


Loading…
Cancel
Save