Skip to content

Commit 7c21cd1

Browse files
committed
Allow printing before options created
1 parent daf09e3 commit 7c21cd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sentry/util/print.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ namespace sentry::util {
1313

1414
template <typename... Args>
1515
void print(sentry::Level p_level, const Variant &p_arg1, const Args &...p_args) {
16-
if (!SentryOptions::get_singleton()->is_debug_enabled() && p_level < sentry::LEVEL_ERROR) {
16+
if (SentryOptions::get_singleton().is_valid() && !SentryOptions::get_singleton()->is_debug_enabled() && p_level < sentry::LEVEL_ERROR) {
1717
return;
1818
}
19-
if (SentryOptions::get_singleton()->get_diagnostic_level() > p_level) {
19+
if (SentryOptions::get_singleton().is_valid() && SentryOptions::get_singleton()->get_diagnostic_level() > p_level) {
2020
return;
2121
}
2222

0 commit comments

Comments
 (0)