summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/column4.cxx')
-rw-r--r--sc/source/core/data/column4.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index bf3b8178b475..d1aacddf4adb 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -533,6 +533,9 @@ public:
void ScColumn::CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 )
{
+ if (nRow2 < nRow1 || !ValidRow(nRow1) || !ValidRow(nRow2))
+ return;
+
ListenerCollector aFunc(rListeners);
sc::ProcessBroadcaster(maBroadcasters.begin(), maBroadcasters, nRow1, nRow2, aFunc);
}