From 5adfcaaadc45b38ed0358a3dde4c39d79b6ceedc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 4 Mar 2016 09:53:13 +0000 Subject: coverity#1326304 Explicit null dereferenced Change-Id: I9eb58884e41d9669d2413f7b5b63bddf6a4b4320 --- wizards/com/sun/star/wizards/document/GridControl.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wizards') 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); -- cgit