@@ -725,7 +725,7 @@ private void addFile(File file, String path, Ctags ctags)
725
725
fa .setFoldingEnabled (env .isFoldingEnabled ());
726
726
727
727
Document doc = new Document ();
728
- try (Writer xrefOut = newXrefWriter (path )) {
728
+ try (Writer xrefOut = newXrefWriter (fa , path )) {
729
729
analyzerGuru .populateDocument (doc , file , path , fa , xrefOut );
730
730
} catch (InterruptedException e ) {
731
731
LOGGER .log (Level .WARNING , "File ''{0}'' interrupted--{1}" ,
@@ -1633,9 +1633,9 @@ public int hashCode() {
1633
1633
* Get a writer to which the xref can be written, or null if no xref
1634
1634
* should be produced for files of this type.
1635
1635
*/
1636
- private Writer newXrefWriter (String path ) throws IOException {
1636
+ private Writer newXrefWriter (AbstractAnalyzer fa , String path ) throws IOException {
1637
1637
RuntimeEnvironment env = RuntimeEnvironment .getInstance ();
1638
- if (env .isGenerateHtml ()) {
1638
+ if (env .isGenerateHtml () && fa != null ) {
1639
1639
boolean compressed = env .isCompressXref ();
1640
1640
File xrefFile = whatXrefFile (path , compressed );
1641
1641
File parentFile = xrefFile .getParentFile ();
0 commit comments