diff --git a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java index c0545fe50..7fae0dfcb 100644 --- a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java +++ b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java @@ -1245,6 +1245,10 @@ private IFile getFileForCMakePath(String sourceFileName, IProject project) pathtolookfor = getIdfToolsPath(); startIndex = sourceFile.indexOf(pathtolookfor); } + if (startIndex == -1) // source file still not found means it was part of another esp-idf + { + return null; + } String relativePath = sourceFile.substring(startIndex + pathtolookfor.length() + 1); IPath projectPath = getComponentsPath().append(relativePath);