fixed NPE if DE were to fail to load a symbol file.
--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/CarbideSourceFilesProvider.java Wed Jun 03 16:37:17 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/CarbideSourceFilesProvider.java Wed Jun 03 16:37:48 2009 -0500
@@ -16,8 +16,6 @@
*/
package com.nokia.cdt.debug.cw.symbian.ui.executables;
-import java.util.ArrayList;
-
import org.eclipse.cdt.debug.core.executables.Executable;
import org.eclipse.cdt.debug.core.executables.ISourceFilesProvider;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -29,13 +27,14 @@
public class CarbideSourceFilesProvider extends PlatformObject implements
ISourceFilesProvider {
- public String[] getSourceFiles(Executable executable,
- IProgressMonitor monitor) {
- ArrayList<String> sourceFiles = new ArrayList<String>();
+ public String[] getSourceFiles(Executable executable, IProgressMonitor monitor) {
ISymbolFile symFile = SymbolReaderManager.getSymbolReaderManager().openSymbolFile(executable.getPath().toOSString());
- String[] sourceArray = symFile.getSourceFiles();
- symFile.close();
- return sourceArray;
+ if (symFile != null) {
+ String[] sourceArray = symFile.getSourceFiles();
+ symFile.close();
+ return sourceArray;
+ }
+ return new String[0];
}
public int getPriority(Executable executable) {