From c211646a236fed7fb0bff62cf42ed79f83f1f336 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Fri, 26 Apr 2019 07:41:34 +0200 Subject: Convert DBG_ASSERT to exception Change-Id: I661de626d21df3ad2ec962a37e4bb33d53a958bc Reviewed-on: https://gerrit.libreoffice.org/71342 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- toolkit/source/controls/stdtabcontroller.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'toolkit/source') diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index c9fb9f99a1e1..d94ffd006c81 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -395,7 +396,9 @@ css::uno::Sequence StdTabController::getSupportedServiceNames() Reference< XControl > StdTabController::FindControl( Sequence< Reference< XControl > >& rCtrls, const Reference< XControlModel > & rxCtrlModel ) { - DBG_ASSERT( rxCtrlModel.is(), "ImplFindControl - which one ?!" ); + if (!rxCtrlModel.is()) + throw lang::IllegalArgumentException("No valid XControlModel", + uno::Reference(), 0); const Reference< XControl > * pCtrls = rCtrls.getConstArray(); sal_Int32 nCtrls = rCtrls.getLength(); -- cgit