mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Check if path is null
This commit is contained in:
parent
98ee69d34c
commit
3316e1062c
1 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,7 @@ import org.eclipse.cdt.core.IBinaryParser;
|
|||
import org.eclipse.cdt.utils.coff.PE;
|
||||
import org.eclipse.cdt.utils.coff.PEArchive;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,6 +22,9 @@ public class PEParser extends AbstractCExtension implements IBinaryParser {
|
|||
* @see org.eclipse.cdt.core.model.IBinaryParser#getBinary(IFile)
|
||||
*/
|
||||
public IBinaryFile getBinary(IPath path) throws IOException {
|
||||
if (path == null) {
|
||||
path = new Path("");
|
||||
}
|
||||
try {
|
||||
PE pe = new PE(path.toOSString());
|
||||
pe.dispose();
|
||||
|
|
Loading…
Add table
Reference in a new issue