Skip to content

Commit cd41db5

Browse files
committed
FIX: Argument for @NotNull parameter 'parent' of net/seesharpsoft/intellij/psi/PsiHelper.getNthChildOfType must not be null #372
1 parent eb15a3a commit cd41db5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableModelBase.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ public void setValue(String value, int rowIndex, int columnIndex) {
157157
}
158158

159159
private int getColumnCount(int rowIndex) {
160-
return getColumnCount(PsiHelper.getNthChildOfType(getPsiTreeUpdater().getPsiFile(), rowIndex, CsvRecord.class));
160+
PsiFile psiFile = getPsiFile();
161+
if (psiFile == null) return 0;
162+
return getColumnCount(PsiHelper.getNthChildOfType(psiFile, rowIndex, CsvRecord.class));
161163
}
162164

163165
private int getColumnCount(PsiElement record) {

0 commit comments

Comments
 (0)