Kaydet (Commit) 78285ba3 authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt Kaydeden (comit) Caolán McNamara

Resolves: #i119653# Crash after delete column(s) from chart's source table

It crashes after adjusting the table size.
fix: Recorrect the logic of code in SwChartDataSequence::Dispose(), release the
relationship inside.

Patch By: Peng Chen
Found By: yanji
Review By: jsc

(cherry picked from commit 3977937c)

Change-Id: I09e9c390527402e5f91031e7370910e93cf70fa7
üst 8bd3be99
......@@ -2460,6 +2460,29 @@ void SAL_CALL SwChartDataSequence::dispose( )
else {
OSL_FAIL( "table missing" );
}
//#i119653# The bug is crashed for an exception thrown by
//SwCharDataSequence::setModified() because
//the SwCharDataSequence object has been disposed.
//
//Actually, the former design of SwClient will disconnect itself
//from the notification list in its destructor.
//
//But the SwCharDataSeqence won't be destructed but disposed in code
//(the data member SwChartDataSequence::bDisposed will be set to
//TRUE), the relationship between client and modification is not
//released.
//
//So any notification from modify object will lead to said
//exception threw out. Recorrect the logic of code in
//SwChartDataSequence::Dispose(), release the relationship
//here...
SwModify* pLclRegisteredIn = GetRegisteredInNonConst();
if (pLclRegisteredIn && pLclRegisteredIn->GetDepends())
{
pLclRegisteredIn->Remove(this);
pTblCrsr = NULL;
}
}
// require listeners to release references to this object
......
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