mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
fix for 148439 NPE in build/clean selected files functionality
This commit is contained in:
parent
a87683fe12
commit
fc4c6c5718
2 changed files with 3 additions and 3 deletions
|
@ -165,7 +165,7 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
IManagedBuildInfo buildInfo = ManagedBuildManager
|
IManagedBuildInfo buildInfo = ManagedBuildManager
|
||||||
.getBuildInfo(file.getProject());
|
.getBuildInfo(file.getProject());
|
||||||
|
|
||||||
if ((buildInfo != null)
|
if ((buildInfo != null) && buildInfo.isValid()
|
||||||
&& buildInfo
|
&& buildInfo
|
||||||
.buildsFileType(file.getFileExtension())) {
|
.buildsFileType(file.getFileExtension())) {
|
||||||
files.add(file);
|
files.add(file);
|
||||||
|
@ -295,7 +295,7 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
IManagedBuildInfo buildInfo = ManagedBuildManager
|
IManagedBuildInfo buildInfo = ManagedBuildManager
|
||||||
.getBuildInfo(file.getProject());
|
.getBuildInfo(file.getProject());
|
||||||
|
|
||||||
if (buildInfo == null) {
|
if (buildInfo == null || !buildInfo.isValid()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
|
|
||||||
// if we have no build info or we can't build the file, then
|
// if we have no build info or we can't build the file, then
|
||||||
// disable the action
|
// disable the action
|
||||||
if ((buildInfo == null)
|
if ((buildInfo == null) || !buildInfo.isValid()
|
||||||
|| !buildInfo.buildsFileType(file
|
|| !buildInfo.buildsFileType(file
|
||||||
.getFileExtension())) {
|
.getFileExtension())) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue