summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-25 17:39:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-25 17:39:33 +0100
commit80502737b2ac722d4adfd4e89d3dc46799ded97e (patch)
treeb43f26de1bbd5559f32283c84d15dd472c84c4cd /sc
parent3b298fb67ade536679678768c55eeb8468b6cf33 (diff)
Resolves: tdf#98895 range search crashes open office if range is null
Change-Id: I12cf1045e1fd606cff58b68254eaf5cba6dee838
Diffstat (limited to 'sc')
-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
}