File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -343,12 +343,19 @@ public final void adjustAllColumnWidths() {
343343 }
344344
345345 protected final void setAllColumnWidths (int [] widths ) {
346+ if (widths == null ) {
347+ return ;
348+ }
346349 getFileEditorState ().setColumnWidths (widths );
347350 updateEditorLayout ();
348351 }
349352
350353 protected int [] calculateDistributedColumnWidths () {
351- Map <Integer , CsvColumnInfo <PsiElement >> columnInfos = this .getColumnInfoMap ().getColumnInfos ();
354+ CsvColumnInfoMap csvColumnInfoMap = this .getColumnInfoMap ();
355+ if (csvColumnInfoMap == null ) {
356+ return null ;
357+ }
358+ Map <Integer , CsvColumnInfo <PsiElement >> columnInfos = csvColumnInfoMap .getColumnInfos ();
352359 Object [][] data = getDataHandler ().getCurrentState ();
353360 int [] widths = new int [columnInfos .size ()];
354361 int tableAutoMaxColumnWidth = CsvEditorSettings .getInstance ().getTableAutoMaxColumnWidth ();
You can’t perform that action at this time.
0 commit comments