diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-14 03:30:23 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-18 17:25:04 -0500 |
| commit | 75359bc9c2bd9f593c59fb156186b3491d0b7c47 (patch) | |
| tree | 5902b02e01abf3374df3e36a7e0c8c59f5403877 /src/shared | |
| parent | fb3fbd34211a28b27214abe070c46951057258ca (diff) | |
fixed crash when disabling mod
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/directoryentry.cpp | 8 | ||||
| -rw-r--r-- | src/shared/directoryentry.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp index 0be5e870..2605d083 100644 --- a/src/shared/directoryentry.cpp +++ b/src/shared/directoryentry.cpp @@ -55,8 +55,8 @@ void elapsedImpl(std::chrono::nanoseconds& out, F&& f) // elapsed() is not optimized out when EnableInstrumentation is false even
// though it's equivalent that this macro
-//#define elapsed(OUT, F) (F)();
-#define elapsed(OUT, F) elapsedImpl(OUT, F);
+#define elapsed(OUT, F) (F)();
+//#define elapsed(OUT, F) elapsedImpl(OUT, F);
static std::wstring tail(const std::wstring &source, const size_t count)
@@ -843,7 +843,9 @@ void FileRegister::sortOrigins() std::scoped_lock lock(m_Mutex);
for (auto&& p : m_Files) {
- p->sortOrigins();
+ if (p) {
+ p->sortOrigins();
+ }
}
}
diff --git a/src/shared/directoryentry.h b/src/shared/directoryentry.h index 74d50625..f406ced6 100644 --- a/src/shared/directoryentry.h +++ b/src/shared/directoryentry.h @@ -64,7 +64,7 @@ class FileRegister; struct DirectoryStats
{
- static constexpr bool EnableInstrumentation = true;
+ static constexpr bool EnableInstrumentation = false;
std::string mod;
|
