summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBReproducerPrivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBReproducerPrivate.h')
-rw-r--r--lldb/source/API/SBReproducerPrivate.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/API/SBReproducerPrivate.h b/lldb/source/API/SBReproducerPrivate.h
index c99faff9a21..7927ba56813 100644
--- a/lldb/source/API/SBReproducerPrivate.h
+++ b/lldb/source/API/SBReproducerPrivate.h
@@ -58,10 +58,14 @@ private:
};
inline InstrumentationData GetInstrumentationData() {
+ if (!lldb_private::repro::Reproducer::Initialized())
+ return {};
+
if (auto *g = lldb_private::repro::Reproducer::Instance().GetGenerator()) {
auto &p = g->GetOrCreate<SBProvider>();
return {p.GetSerializer(), p.GetRegistry()};
}
+
return {};
}
OpenPOWER on IntegriCloud