summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-05-13 21:08:27 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-05-13 22:54:10 -0400
commit3cf690afecdc1d8dde3457efc17121af69688b5d (patch)
tree4f92d33a78a7302824a8a5ff07daf6d2ba951045
parent33e3b16a5adbbc95b13f37482fa6723d8466215f (diff)
Fixed segfault.
Use the raw pointer after the auto_ptr has been inserted; as it becomes invalid once the ownership moves to the container.
-rw-r--r--sc/source/core/tool/dbcolect.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index 135a88fe4..a7a56102f 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -711,10 +711,10 @@ bool ScDBCollection::NamedDBs::insert(ScDBData* p)
pair<DBsType::iterator, bool> r = maDBs.insert(pData);
- if (r.second && pData->HasImportParam() && !pData->HasImportSelection())
+ if (r.second && p->HasImportParam() && !p->HasImportSelection())
{
- pData->SetRefreshHandler(mrParent.GetRefreshHandler());
- pData->SetRefreshControl(mrDoc.GetRefreshTimerControlAddress());
+ p->SetRefreshHandler(mrParent.GetRefreshHandler());
+ p->SetRefreshControl(mrDoc.GetRefreshTimerControlAddress());
}
return r.second;
}