Kaydet (Commit) 3de097e0 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

fix bug in SvtListener::CopyAllBroadcasters

need to flush existing broadcasters before overwriting

Change-Id: If570b838d0313ab7598b36ff8a32fc6d31dea92c
Reviewed-on: https://gerrit.libreoffice.org/61151
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8e56287a
......@@ -55,6 +55,7 @@ public:
bool EndListening( SvtBroadcaster& rBroadcaster );
void EndListeningAll();
/// Overwrites existing broadcasters with the ones from the specified listener
void CopyAllBroadcasters( const SvtListener& r );
bool HasBroadcaster() const;
......
......@@ -90,6 +90,7 @@ void SvtListener::EndListeningAll()
void SvtListener::CopyAllBroadcasters( const SvtListener& r )
{
EndListeningAll();
BroadcastersType aCopy(r.maBroadcasters);
maBroadcasters.swap(aCopy);
BroadcastersType::iterator it = maBroadcasters.begin();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment