From: Daniel Kirschten Date: Thu, 26 Sep 2019 23:23:51 +0000 (+0200) Subject: Fixed MemoryTableContentProvider#update throwing an exception X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=3997a9bdace864fab412a690533d5151161053b9;hp=b40a1ee7db799408250f7c1fe365f29c9e499a97;p=Mograsim.git Fixed MemoryTableContentProvider#update throwing an exception --- diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryTableContentProvider.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryTableContentProvider.java index 90ad7885..3d67c9dc 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryTableContentProvider.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryTableContentProvider.java @@ -54,9 +54,12 @@ public class MemoryTableContentProvider implements ILazyContentProvider, MemoryC @Override public void updateElement(int index) { - long address = lower + index; - if (address <= memory.getDefinition().getMaximalAddress()) - viewer.replace(new MemoryTableRow(address, memory), index); + if (index < amount) + { + long address = lower + index; + if (address <= memory.getDefinition().getMaximalAddress()) + viewer.replace(new MemoryTableRow(address, memory), index); + } } @Override