commit | 01f2ef5496a191e1ebe54a825f41a97889e5b612 | [log] [tgz] |
---|---|---|
author | Jeff Johnston <jjohnstn@redhat.com> | Fri Aug 17 12:40:43 2018 -0400 |
committer | Jeff Johnston <jjohnstn@redhat.com> | Sat Aug 18 00:25:34 2018 -0400 |
tree | a691b2620b97b08cb582c8df9ec7aac5a1e3ad7f | |
parent | 6d53e05ea725618af6f96c20dd2e776e5043677b [diff] |
Bug 472549 - NullPointerException in CProjectBuildHelpers - add null check to isOptionCheckedInCDTTool after attempting to get the compiler tool ITool Change-Id: I5ad6996bbecb5a1768b44f60ece7f3d4d1eea40b Reviewed-on: https://git.eclipse.org/r/127610 Tested-by: CI Bot Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> (cherry picked from commit 8f8d132a5e9b5c56de0a84c82fcb2d86c6660256) Reviewed-on: https://git.eclipse.org/r/127611
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 eb69406..29d25fc 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 @@ //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);