diff --git a/sentry_sdk/utils.py b/sentry_sdk/utils.py
index <HASH>..<HASH> 100644
--- a/sentry_sdk/utils.py
+++ b/sentry_sdk/utils.py
@@ -169,20 +169,15 @@ def get_lines_from_file(filename, lineno, loader=None, module=None):
     upper_bound = min(lineno + 1 + context_lines, len(source))
 
     try:
-        pre_context = [line.strip("\r\n") for line in source[lower_bound:lineno]]
-        context_line = source[lineno].strip("\r\n")
+        pre_context = [slim_string(line.strip("\r\n")) for line in source[lower_bound:lineno]]
+        context_line = slim_string(source[lineno].strip("\r\n"))
         post_context = [
-            line.strip("\r\n") for line in source[(lineno + 1) : upper_bound]
+            slim_string(line.strip("\r\n")) for line in source[(lineno + 1) : upper_bound]
         ]
+        return pre_context, context_line, post_context
     except IndexError:
         # the file may have changed since it was loaded into memory
-        return None, None, None
-
-    return (
-        slim_string(pre_context),
-        slim_string(context_line),
-        slim_string(post_context),
-    )
+        return [], None, []
 
 
 def get_source_context(frame):
chore: adapt output s.t. jan has less work