diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java index cca5de994cae..381370835d7c 100644 --- a/wizards/com/sun/star/wizards/document/GridControl.java +++ b/wizards/com/sun/star/wizards/document/GridControl.java @@ -57,6 +57,11 @@ public class GridControl extends Shape "Error: GridModel does not export XControlModel interface"); } + if (xControlShape == null) { + throw new Exception( + "Error: GridModel does not have a XControlShape"); + } + xControlShape.setControl(xControlModel); xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, oGridModel ); oFormHandler.xDrawPage.add(xShape);