Skip to content

Commit 54bec78

Browse files
committed
Update InfoTable.java
1 parent ea6a20c commit 54bec78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/messageTab/Info/InfoTable.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ public List<String> getSelectedUrls() {
271271
public String getSelectedContent() {
272272
int[] rows = this.getSelectedRows();
273273
int[] columns = this.getSelectedColumns();
274+
275+
// ⚠️ 有可能在反选瞬间 rows/cols 为空 → 避免返回空内容
276+
if (rows == null || rows.length == 0 || columns == null || columns.length == 0) {
277+
return ""; // 或者 return null;
278+
}
279+
274280
List<String> result = new ArrayList<>();
275281
for (int row : rows) {
276282
List<String> line = new ArrayList<>();

0 commit comments

Comments
 (0)