Skip to content

Commit 7f1687c

Browse files
committed
local wer_report_id
1 parent 7cbdb44 commit 7f1687c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/backends/native/sentry_crash_daemon.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,9 +2243,14 @@ add_wer_context(sentry_value_t event, const sentry_crash_context_t *ctx)
22432243
return false;
22442244
}
22452245

2246+
char wer_report_id[sizeof(ctx->platform.wer_report_id)];
2247+
memcpy(
2248+
wer_report_id, ctx->platform.wer_report_id, sizeof(wer_report_id) - 1);
2249+
wer_report_id[sizeof(wer_report_id) - 1] = '\0';
2250+
22462251
sentry_value_t wer_context = sentry__wer_report_lookup(ctx->crash_event_id);
22472252
if (sentry_value_is_null(wer_context)) {
2248-
if (sentry__string_empty(ctx->platform.wer_report_id)) {
2253+
if (sentry__string_empty(wer_report_id)) {
22492254
return false;
22502255
}
22512256
wer_context = sentry_value_new_object();
@@ -2256,8 +2261,8 @@ add_wer_context(sentry_value_t event, const sentry_crash_context_t *ctx)
22562261
const char *context_report_id = sentry_value_as_string(
22572262
sentry_value_get_by_key(wer_context, "report_id"));
22582263
if (sentry__string_empty(context_report_id)) {
2259-
sentry_value_set_by_key(wer_context, "report_id",
2260-
sentry_value_new_string(ctx->platform.wer_report_id));
2264+
sentry_value_set_by_key(
2265+
wer_context, "report_id", sentry_value_new_string(wer_report_id));
22612266
}
22622267

22632268
sentry_value_t contexts = sentry_value_get_by_key(event, "contexts");

0 commit comments

Comments
 (0)