summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-02 14:21:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-02 14:26:44 +0000
commit6a4308109a185834d1cbaed1c567ad67d8e2216a (patch)
tree801a11083924d443795bd407e99576eadeed8431 /sfx2
parent4e5a74a2fa7dd7bc6c0c5847515af5c4c4586b6d (diff)
usageinfo causes one of our more frequent fedora 25 crashes
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/unoctitm.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index cb7590c96c94..920f921a5cfb 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -472,6 +472,9 @@ class UsageInfo {
/// Command vs. how many times it was used
UsageMap maUsage;
+ /// config path, get it long before atexit time
+ OUString msConfigPath;
+
public:
UsageInfo() : mbIsCollecting(false)
{
@@ -489,7 +492,12 @@ public:
void save();
/// Modify the flag whether we are collecting.
- void setCollecting(bool bIsCollecting) { mbIsCollecting = bIsCollecting; }
+ void setCollecting(bool bIsCollecting)
+ {
+ mbIsCollecting = bIsCollecting;
+ if (mbIsCollecting)
+ msConfigPath = SvtPathOptions().GetConfigPath();
+ }
};
void UsageInfo::increment(const OUString &rCommand)
@@ -507,7 +515,7 @@ void UsageInfo::save()
if (!mbIsCollecting)
return;
- OUString path(SvtPathOptions().GetConfigPath());
+ OUString path(msConfigPath);
path += "usage/";
osl::Directory::createPath(path);