Skip to content

Commit b45efcb

Browse files
Merge branch 'IEP-90' into 'master'
IEP-90: Fix for NPE while configuring cmake toolchain Closes IEP-90 See merge request idf/idf-eclipse-plugin!80
2 parents d269eac + 8b0a130 commit b45efcb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/ESPToolChainManager.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ protected String getIdfToolsExportPath()
209209

210210
public void initCMakeToolChain(IToolChainManager tcManager, ICMakeToolChainManager manager)
211211
{
212+
String idfPath = IDFUtil.getIDFPath();
213+
if (StringUtil.isEmpty(idfPath)) //not yet configured
214+
{
215+
return;
216+
}
217+
212218
Map<String, String> properties = new HashMap<>();
213219
properties.put(IToolChain.ATTR_OS, ESPToolChain.OS);
214220
properties.put(IToolChain.ATTR_ARCH, ESPToolChain.ARCH);
@@ -217,7 +223,6 @@ public void initCMakeToolChain(IToolChainManager tcManager, ICMakeToolChainManag
217223
for (IToolChain tc : tcManager.getToolChainsMatching(properties))
218224
{
219225

220-
String idfPath = IDFUtil.getIDFPath();
221226
if (!new File(idfPath).exists())
222227
{
223228
String errorMsg = MessageFormat.format(Messages.ESP32CMakeToolChainProvider_PathDoesnNotExist,

0 commit comments

Comments
 (0)