Skip to content

Commit 78deccf

Browse files
committed
check for Platform in InitUtil before trying to instantiate converter/profiler
1 parent b03edbb commit 78deccf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sentry/src/main/java/io/sentry/util/InitUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ public static IProfileConverter initializeProfileConverter(@NotNull SentryOption
108108
}
109109

110110
private static boolean shouldInitializeProfiler(@NotNull SentryOptions options) {
111-
return options.isContinuousProfilingEnabled()
111+
return Platform.isJvm() && options.isContinuousProfilingEnabled()
112112
&& options.getContinuousProfiler() instanceof NoOpContinuousProfiler;
113113
}
114114

115115
private static boolean shouldInitializeProfileConverter(@NotNull SentryOptions options) {
116-
return options.isContinuousProfilingEnabled()
116+
return Platform.isJvm() && options.isContinuousProfilingEnabled()
117117
&& options.getProfilerConverter() instanceof NoOpProfileConverter;
118118
}
119119

0 commit comments

Comments
 (0)