1
0
Fork 0
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:
Alain Magloire 2003-04-29 19:37:52 +00:00
parent 98ee69d34c
commit 3316e1062c

View file

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