Skip to content

Conversation

@kapluscheung
Copy link

@kapluscheung kapluscheung commented Nov 21, 2025

Addressed problem description

fix 5024: 'NoneType' object has no attribute 'is_animation_playing
5024

Solution description

Added checking for context screen:

screen = bpy.context.screen
    if screen and screen.is_animation_playing:
        return

Preflight checklist

Put an x letter in each brackets when you're done this item:

  • Code changes complete.
  • Code documentation complete.
  • Documentation for users complete (or not required, if user never sees these changes).
  • Manual testing done.
  • Unit-tests implemented.
  • Ready for merge.

Copilot AI review requested due to automatic review settings November 21, 2025 03:37
Copilot finished reviewing on behalf of kapluscheung November 21, 2025 03:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a NoneType AttributeError that occurred when bpy.context.screen is None and the code attempts to access the is_animation_playing attribute. The fix adds a null check before accessing the attribute.

  • Added defensive null check for bpy.context.screen in the scene change handler
  • Consistent with existing null-checking pattern used elsewhere in the same file
  • Prevents crashes during rendering or other contexts where screen context is unavailable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant