Skip to content

Commit 049e5ab

Browse files
committed
Avoid NPE.
1 parent 0b3604c commit 049e5ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gate/plugin/learningframework/export/CorpusExporterMatrixMarket2.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void export(File directory, CorpusRepresentationMallet crm, String instan
119119
for(Instance instance : instances) {
120120
rowNr++;
121121
Boolean ignoreInstance = (Boolean)instance.getProperty(FeatureExtraction.PROP_IGNORE_HAS_MV);
122-
if(ignoreInstance) continue;
122+
if(ignoreInstance != null && ignoreInstance) continue;
123123
// to export instance weights, we check the first instance if a weight is set:
124124
// if yes, then a third file is created which will contain the weights for each instance
125125
Object instanceWeightObject = instance.getProperty("instanceWeight");

0 commit comments

Comments
 (0)