diff options
author | Eike Rathke <erack@redhat.com> | 2015-08-12 20:15:08 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-13 10:11:19 +0000 |
commit | 61fb1d4de37f88f6408a483c3713a373340d6fb3 (patch) | |
tree | 7f7e6e31492e77d97806da7670d1638a1d004c1b | |
parent | 6e87f5ca825599c496918c6a890b7a3bac0fbbc2 (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/17684
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/core/data/bcaslot.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 2174216834e1..f9d6a19518e8 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -1155,12 +1155,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(); |