Skip to content

Commit

Permalink
[FIX] NullPointerException thrown when trying to view CSV as table #185
Browse files Browse the repository at this point in the history
  • Loading branch information
SeeSharpSoft committed Feb 22, 2020
1 parent b5f8712 commit 8e9fd36
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,19 @@ public final void adjustAllColumnWidths() {
}

protected final void setAllColumnWidths(int[] widths) {
if (widths == null) {
return;
}
getFileEditorState().setColumnWidths(widths);
updateEditorLayout();
}

protected int[] calculateDistributedColumnWidths() {
Map<Integer, CsvColumnInfo<PsiElement>> columnInfos = this.getColumnInfoMap().getColumnInfos();
CsvColumnInfoMap csvColumnInfoMap = this.getColumnInfoMap();
if (csvColumnInfoMap == null) {
return null;
}
Map<Integer, CsvColumnInfo<PsiElement>> columnInfos = csvColumnInfoMap.getColumnInfos();
Object[][] data = getDataHandler().getCurrentState();
int[] widths = new int[columnInfos.size()];
int tableAutoMaxColumnWidth = CsvEditorSettings.getInstance().getTableAutoMaxColumnWidth();
Expand Down

0 comments on commit 8e9fd36

Please sign in to comment.