mirror of
https://github.com/processing/processing4.git
synced 2026-01-28 10:51:07 +01:00
PPS: fall back to sketchcode.program if sketchcode.document is null
This commit is contained in:
@@ -274,10 +274,14 @@ public class PreprocessingService {
|
||||
for (SketchCode sc : sketch.getCode()) {
|
||||
if (sc.isExtension("pde")) {
|
||||
tabStartsList.append(workBuffer.length());
|
||||
try {
|
||||
workBuffer.append(sc.getDocumentText());
|
||||
} catch (BadLocationException e) {
|
||||
e.printStackTrace();
|
||||
if (sc.getDocument() != null) {
|
||||
try {
|
||||
workBuffer.append(sc.getDocumentText());
|
||||
} catch (BadLocationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
workBuffer.append(sc.getProgram());
|
||||
}
|
||||
workBuffer.append('\n');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user