Fix some NPE on -> Add change log context menu for field

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2898860
This commit is contained in:
vpj-cd 2010-01-06 00:52:41 +00:00
parent 7a831046d0
commit 0655a2b950
4 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh
if (gridField != null) if (gridField != null)
{ {
popupMenu = new WEditorPopupMenu(true, true, false); popupMenu = new WEditorPopupMenu(true, true, false);
if (gridField.getGridTab() != null) if (gridField != null && gridField.getGridTab() != null)
{ {
WFieldRecordInfo.addMenu(popupMenu); WFieldRecordInfo.addMenu(popupMenu);
} }

View File

@ -116,7 +116,7 @@ public class WNumberEditor extends WEditor implements ContextMenuListener
getComponent().getDecimalbox().setFormat(format.toPattern()); getComponent().getDecimalbox().setFormat(format.toPattern());
popupMenu = new WEditorPopupMenu(true, true, false); popupMenu = new WEditorPopupMenu(true, true, false);
if (gridField.getGridTab() != null) if (gridField != null && gridField.getGridTab() != null)
{ {
WFieldRecordInfo.addMenu(popupMenu); WFieldRecordInfo.addMenu(popupMenu);
} }

View File

@ -146,7 +146,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
editor.addEventListener(Events.ON_CLICK, popupMenu); editor.addEventListener(Events.ON_CLICK, popupMenu);
popupMenu.appendChild(editor); popupMenu.appendChild(editor);
if (gridField.getGridTab() != null) if (gridField != null && gridField.getGridTab() != null)
{ {
WFieldRecordInfo.addMenu(popupMenu); WFieldRecordInfo.addMenu(popupMenu);
} }

View File

@ -145,7 +145,7 @@ ContextMenuListener, IZoomableEditor
if (gridField != null) if (gridField != null)
{ {
popupMenu = new WEditorPopupMenu(zoom, true, true); popupMenu = new WEditorPopupMenu(zoom, true, true);
if (gridField.getGridTab() != null) if (gridField != null && gridField.getGridTab() != null)
{ {
WFieldRecordInfo.addMenu(popupMenu); WFieldRecordInfo.addMenu(popupMenu);
} }