summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-08-12 20:15:08 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-20 20:34:04 +0200
commitb2822335d0cc0c74d34f0749fe7784e7a1caa6e2 (patch)
tree49410aabff5c6146925ee5ebbbb136ef0e8a2dd8 /sc/source/core
parentd1afeb911fe9fb263f78c2ae60d522a7f3119985 (diff)
Resolves: tdf#93388 broadcasting to removed listeners isn't a good idea
This cures only a symptom, the underlying cause is that the broadcasters still are listed in maBulkGroupAreas. Change-Id: I9625483016a51eb6f6a7e3d58ed42c7dad3a57b3 (cherry picked from commit 2d4edd7de2e67db5bd17e7a89e2496611ebcc165) Reviewed-on: https://gerrit.libreoffice.org/17685 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/bcaslot.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 12aeee70f652..83e5e4877313 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -1229,12 +1229,22 @@ void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
for (; it != itEnd; ++it)
{
ScBroadcastArea* pArea = it->first;
- const sc::ColumnSpanSet* pSpans = it->second;
assert(pArea);
- assert(pSpans);
- aHint.setSpans(pSpans);
- pArea->GetBroadcaster().Broadcast(aHint);
- bBroadcasted = true;
+ SvtBroadcaster& rBC = pArea->GetBroadcaster();
+ if (!rBC.HasListeners())
+ {
+ /* FIXME: find the cause where the last listener is removed and
+ * this area is still listed here. */
+ SAL_WARN("sc.core","ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas - pArea has no listeners and should had been removed already");
+ }
+ else
+ {
+ const sc::ColumnSpanSet* pSpans = it->second;
+ assert(pSpans);
+ aHint.setSpans(pSpans);
+ rBC.Broadcast(aHint);
+ bBroadcasted = true;
+ }
}
maBulkGroupAreas.clear();