Skip to content

Commit 5c9c37d

Browse files
author
urs.graf
committed
Catch null pointer exception when pl file is missing
1 parent 98e7983 commit 5c9c37d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/org/deepjava/linker/Linker32.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1327,13 +1327,14 @@ public static long writeTargetImageToMcsFile(String fname) throws IOException {
13271327
// open mcs file for writing
13281328
fname = fname + '.' + Linker32.targetImage.segment.owner.name + ".mcs";
13291329
BufferedWriter writerMcs = new BufferedWriter(new FileWriter(fname));
1330-
String plFile = Configuration.getPlFileName().toString();
1331-
if (plFile == null) {
1330+
HString pl = Configuration.getPlFileName();
1331+
if (pl == null) {
13321332
ErrorReporter.reporter.error(823, "add PL file to deep configuration");
13331333
readerBin.close();
13341334
writerMcs.close();
13351335
return 0;
13361336
}
1337+
String plFile = pl.toString();
13371338
HString[] libs = Configuration.getLibPaths();
13381339
boolean found = false;
13391340
// open predefined Xilinx mcs file

0 commit comments

Comments
 (0)