From df215441ebe544d6bc4a54fd81a2c22997c10a28 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 14 Apr 2025 14:17:42 +0200 Subject: [PATCH] Fix (unreported): Protect Outliner UI py code util against `None` `context.id` value. Detected by review of !135936, the code checked for a non-empty `context.selected_ids`, but did not propect against a potential `None` `context.id`. --- scripts/startup/bl_ui/space_outliner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/startup/bl_ui/space_outliner.py b/scripts/startup/bl_ui/space_outliner.py index 0b579aa62a9..ca2479c92dc 100644 --- a/scripts/startup/bl_ui/space_outliner.py +++ b/scripts/startup/bl_ui/space_outliner.py @@ -11,7 +11,7 @@ from bpy.app.translations import ( def has_selected_ids_in_context(context): - if hasattr(context, "id"): + if getattr(context, "id", None) is not None: return True if len(context.selected_ids) > 0: return True