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);