X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmemory%2FMemoryTableContentProvider.java;fp=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmemory%2FMemoryTableContentProvider.java;h=a27f31f33ae02381b37ffb7193f6f2a51a946102;hb=d55dc585ecd9f8bfd800ba7a034ab1e6b6bba2b3;hp=3d67c9dcd4ccdbc18b42555017001f3a175dd8a1;hpb=7ec6bf77c73b103da0f732a2efdae1738659e845;p=Mograsim.git 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 3d67c9dc..a27f31f3 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 @@ -27,12 +27,13 @@ public class MemoryTableContentProvider implements ILazyContentProvider, MemoryC public void updateItemCount() { - if (memory != null) - { - long size = memory.getDefinition().getMaximalAddress() - lower; - viewer.setItemCount(size > amount ? amount : (int) size); - } else - viewer.setItemCount(0); + if (viewer != null) + if (memory != null) + { + long size = memory.getDefinition().getMaximalAddress() - lower; + viewer.setItemCount(size > amount ? amount : (int) size); + } else + viewer.setItemCount(0); } public long getLowerBound()