Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-08-17 12:40:43 -0400
committerJeff Johnston2018-08-17 13:13:12 -0400
commit8f8d132a5e9b5c56de0a84c82fcb2d86c6660256 (patch)
treeef837ffd5f49d012ee927f2b5a8a636ecae048c8
parent45645c96eeb40e3d9242a7fa84a37a85e617abc9 (diff)
downloadorg.eclipse.linuxtools-8f8d132a5e9b5c56de0a84c82fcb2d86c6660256.tar.gz
org.eclipse.linuxtools-8f8d132a5e9b5c56de0a84c82fcb2d86c6660256.tar.xz
org.eclipse.linuxtools-8f8d132a5e9b5c56de0a84c82fcb2d86c6660256.zip
Bug 472549 - NullPointerException in CProjectBuildHelpers
- add null check to isOptionCheckedInCDTTool after attempting to get the compiler tool Change-Id: I5ad6996bbecb5a1768b44f60ece7f3d4d1eea40b Reviewed-on: https://git.eclipse.org/r/127610 Tested-by: CI Bot Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.ui/src/org/eclipse/linuxtools/profiling/ui/CProjectBuildHelpers.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/profiling/org.eclipse.linuxtools.profiling.ui/src/org/eclipse/linuxtools/profiling/ui/CProjectBuildHelpers.java b/profiling/org.eclipse.linuxtools.profiling.ui/src/org/eclipse/linuxtools/profiling/ui/CProjectBuildHelpers.java
index eb6940600b..29d25fc514 100644
--- a/profiling/org.eclipse.linuxtools.profiling.ui/src/org/eclipse/linuxtools/profiling/ui/CProjectBuildHelpers.java
+++ b/profiling/org.eclipse.linuxtools.profiling.ui/src/org/eclipse/linuxtools/profiling/ui/CProjectBuildHelpers.java
@@ -236,6 +236,11 @@ public class CProjectBuildHelpers {
//Get Compiler tool.
ITool gccCompileriTool = helperGetGccCompilerToolBySuperClass(toolSuperClassId, activeConf);
+
+ if (gccCompileriTool == null) {
+ MessageDialogSyncedRunnable.openErrorSyncedRunnable(ProfilingMessages.errorTitle, ProfilingMessages.errorGetProjectToolname);
+ return false;
+ }
//(Get immutable option: This is like a 'template' that we will use to get the actual option)
IOption optionTemplate = gccCompileriTool.getOptionById(optionIDString);

Back to the top