mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 00:45:28 +02:00
Catch the case the path is null.
This commit is contained in:
parent
b1afbfd7c7
commit
1ae15870b3
1 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,7 @@ import org.eclipse.cdt.core.IBinaryParser;
|
|||
import org.eclipse.cdt.utils.elf.AR;
|
||||
import org.eclipse.cdt.utils.elf.Elf;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,6 +22,9 @@ public class ElfParser extends AbstractCExtension implements IBinaryParser {
|
|||
* @see org.eclipse.cdt.core.model.IBinaryParser#getBinary(IPath)
|
||||
*/
|
||||
public IBinaryFile getBinary(IPath path) throws IOException {
|
||||
if (path == null ) {
|
||||
path = new Path("");
|
||||
}
|
||||
try {
|
||||
Elf e = new Elf(path.toOSString());
|
||||
e.dispose();
|
||||
|
|
Loading…
Add table
Reference in a new issue