Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
bill23-kim committed May 13, 2016
1 parent d67a5ac commit adb7e55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scouter.client/src/scouter/client/util/MenuUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
import scouter.client.xlog.actions.OpenXLogLoadTimeAction;
import scouter.client.xlog.actions.OpenXLogRealTimeAction;
import scouter.lang.Counter;
import scouter.lang.ObjectType;
import scouter.lang.counters.CounterConstants;
import scouter.lang.counters.CounterEngine;
import scouter.util.DateUtil;
Expand Down Expand Up @@ -388,7 +389,9 @@ public static void createCounterContextMenu(final String id, Control control, fi
MenuManager mgr = new MenuManager();
mgr.setRemoveAllWhenShown(true);
final CounterEngine counterEngine = ServerManager.getInstance().getServer(serverId).getCounterEngine();
final Counter counterObj = counterEngine.getObjectType(objType).getFamily().getCounter(counter);
ObjectType objectType = counterEngine.getObjectType(objType);
if (objectType == null) return;
final Counter counterObj = objectType.getFamily().getCounter(counter);
mgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
if (mgr == null) return;
Expand Down

0 comments on commit adb7e55

Please sign in to comment.