Kaydet (Commit) 32d4c191 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1265800 Dereference null return value

Change-Id: Id5966c1f9b51ea47df52ad7a1e69a29a69e1764c
üst a28ad8c9
......@@ -73,10 +73,14 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget,
if (rMarkList.GetMark(0))
{
SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, rMarkList.GetMark(0)->GetMarkedSdrObj());
OSL_ENSURE( pUnoCtrl, "not an SdrUnoObj" );
if (!pUnoCtrl)
return;
uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel();
OSL_ENSURE( xControlModel.is(), "UNO-Control without Model" );
if( !xControlModel.is() )
if (!xControlModel.is())
return;
uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment