Browse Source

Fix loading single plugins without LV2_PATH being set

tags/1.9.8
Filipe Coelho 8 years ago
parent
commit
14dd4690ef
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      source/utils/CarlaLv2Utils.hpp

+ 7
- 2
source/utils/CarlaLv2Utils.hpp View File

@@ -71,6 +71,7 @@


#include "lilv/lilvmm.hpp" #include "lilv/lilvmm.hpp"
#include "sratom/sratom.h" #include "sratom/sratom.h"
#include "lilv/config/lilv_config.h"


// enable -Wdocumentation again // enable -Wdocumentation again
#if defined(__clang__) && (__clang_major__ * 100 + __clang_minor__) > 300 #if defined(__clang__) && (__clang_major__ * 100 + __clang_minor__) > 300
@@ -416,9 +417,13 @@ public:
return lv2World; return lv2World;
} }


void initIfNeeded(const char* const LV2_PATH)
void initIfNeeded(const char* LV2_PATH)
{ {
CARLA_SAFE_ASSERT_RETURN(LV2_PATH != nullptr,);
if (LV2_PATH == nullptr || LV2_PATH[0] == '\0')
{
static const char* const DEFAULT_LV2_PATH = LILV_DEFAULT_LV2_PATH;
LV2_PATH = DEFAULT_LV2_PATH;
}


if (! needsInit) if (! needsInit)
return; return;


Loading…
Cancel
Save