summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index eedf02e153e0..944c56d13cc2 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -909,11 +909,11 @@ static void lcl_CopyProperties( beans::XPropertySet& rDest, beans::XPropertySet&
static SCTAB lcl_FirstTab( const ScRangeList& rRanges )
{
- OSL_ENSURE(rRanges.size() >= 1, "was fuer Ranges ?!?!");
- const ScRange* pFirst = rRanges[ 0 ];
+ if (rRanges.empty())
+ throw std::out_of_range("empty range");
+ const ScRange* pFirst = rRanges[0];
if (pFirst)
return pFirst->aStart.Tab();
-
return 0; // soll nicht sein
}