From 8c8d4c0f039aff6936d9059c1ad24019e239df7b Mon Sep 17 00:00:00 2001 From: "sentry-autofix-experimental[bot]" <157164994+sentry-autofix-experimental[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 17:24:18 +0000 Subject: [PATCH] Add null check for frames in SDKCrashDetector to prevent AttributeError --- src/sentry/utils/sdk_crashes/sdk_crash_detector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sentry/utils/sdk_crashes/sdk_crash_detector.py b/src/sentry/utils/sdk_crashes/sdk_crash_detector.py index e555a9179841ad..b64ae0d4a865b7 100644 --- a/src/sentry/utils/sdk_crashes/sdk_crash_detector.py +++ b/src/sentry/utils/sdk_crashes/sdk_crash_detector.py @@ -75,6 +75,8 @@ def is_sdk_crash(self, frames: Sequence[Mapping[str, Any]]) -> bool: # Cocoa SDK frames can be marked as in_app. Therefore, the algorithm only checks if frames # are SDK frames or from system libraries. for frame in reversed(frames): + if frame is None: + continue function = frame.get("function") if function: for matcher in self.config.sdk_crash_ignore_functions_matchers: