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`.
This commit is contained in:
Bastien Montagne 2025-04-14 14:17:42 +02:00
parent e8877df863
commit df215441eb

View File

@ -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