# HG changeset patch # User wpaul # Date 1244065068 18000 # Node ID 42aa6ce7b5d024f4f3af5143c57689a48682b7ca # Parent 08d645f6399ffac57f2d710ebfad5a128da62d7a fixed NPE if DE were to fail to load a symbol file. diff -r 08d645f6399f -r 42aa6ce7b5d0 debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/CarbideSourceFilesProvider.java --- 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 sourceFiles = new ArrayList(); + 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) {