mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Fixed NPE in byte viewer when switching themes
This commit is contained in:
parent
2f8217af10
commit
31e926fd44
2 changed files with 6 additions and 3 deletions
|
@ -612,8 +612,8 @@ public class ByteViewerPanel extends JPanel implements LayoutModel, LayoutListen
|
||||||
c.setFontMetrics(fm);
|
c.setFontMetrics(fm);
|
||||||
}
|
}
|
||||||
indexFactory = new IndexFieldFactory(fm);
|
indexFactory = new IndexFieldFactory(fm);
|
||||||
updateIndexMap();
|
|
||||||
indexFactory.setSize(getIndexSizeInChars());
|
indexFactory.setSize(getIndexSizeInChars());
|
||||||
|
updateIndexMap();
|
||||||
indexPanel.modelSizeChanged(IndexMapper.IDENTITY_MAPPER);
|
indexPanel.modelSizeChanged(IndexMapper.IDENTITY_MAPPER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,9 @@ class IndexFieldFactory {
|
||||||
width = ByteViewerComponentProvider.DEFAULT_NUMBER_OF_CHARS * charWidth;
|
width = ByteViewerComponentProvider.DEFAULT_NUMBER_OF_CHARS * charWidth;
|
||||||
missingValueColor = ByteViewerComponentProvider.SEPARATOR_COLOR;
|
missingValueColor = ByteViewerComponentProvider.SEPARATOR_COLOR;
|
||||||
startX = charWidth;
|
startX = charWidth;
|
||||||
|
|
||||||
|
// initialize to a non-null value
|
||||||
|
setSize(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue