summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/document/GridControl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java
index 4b8f98dba2a3..cca5de994cae 100644
--- a/wizards/com/sun/star/wizards/document/GridControl.java
+++ b/wizards/com/sun/star/wizards/document/GridControl.java
@@ -51,6 +51,12 @@ public class GridControl extends Shape
xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, oGridModel );
_xFormName.insertByName(_sname, oGridModel);
XControlModel xControlModel = UnoRuntime.queryInterface( XControlModel.class, oGridModel );
+ // test if the interface was available
+ if (xControlModel == null) {
+ throw new Exception(
+ "Error: GridModel does not export XControlModel interface");
+ }
+
xControlShape.setControl(xControlModel);
xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, oGridModel );
oFormHandler.xDrawPage.add(xShape);