mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
handle rare case when graphics object is null
This commit is contained in:
parent
e539a0e848
commit
3dbf7b1ed2
@ -304,6 +304,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
|||||||
if (content != null) {
|
if (content != null) {
|
||||||
// get the fontmetrics
|
// get the fontmetrics
|
||||||
final Graphics graphics = ov.getGraphics();
|
final Graphics graphics = ov.getGraphics();
|
||||||
|
if (graphics != null) {
|
||||||
final FontMetrics metrics = graphics.getFontMetrics();
|
final FontMetrics metrics = graphics.getFontMetrics();
|
||||||
|
|
||||||
// for the "Name" column
|
// for the "Name" column
|
||||||
@ -315,7 +316,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
|||||||
int colWidth = Math.min(getMaxColumnWidth(colIndex, metrics, margin, 8, props, content), 350);
|
int colWidth = Math.min(getMaxColumnWidth(colIndex, metrics, margin, 8, props, content), 350);
|
||||||
ov.getOutline().getColumnModel().getColumn(colIndex).setPreferredWidth(colWidth);
|
ov.getOutline().getColumnModel().getColumn(colIndex).setPreferredWidth(colWidth);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there's no content just auto resize all columns
|
// if there's no content just auto resize all columns
|
||||||
|
Loading…
x
Reference in New Issue
Block a user