Skip to content

fix(objectcreation): Prevent null drawable crash during object creation - #629

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/client-57n-drawable-null-check
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/client-57n-drawable-null-check

Conversation

@sentry

@sentry sentry Bot commented Oct 5, 2026

Copy link
Copy Markdown

This PR addresses a fatal EXCEPTION_ACCESS_VIOLATION_READ crash occurring in GenericObjectCreationNugget::doStuffToObj (CLIENT-57N).

The root cause was an unguarded dereference of obj->getDrawable() when creating new objects, specifically debris objects spawned by SlowDeathBehavior. In certain contexts, Object::getDrawable() can legitimately return a null pointer if the drawable has not yet been bound, leading to a crash when getDrawModules() or fadeIn/fadeOut were called on a null pointer.

The fix involves adding null checks for the Drawable* pointer returned by obj->getDrawable() before attempting to dereference it. This includes:

  • Wrapping the DrawModule iteration at ObjectCreationList.cpp:~935 with a null check for the drawable.
  • Adding null checks before calling debris->getDrawable()->fadeIn() at ObjectCreationList.cpp:~1331 and debris->getDrawable()->fadeOut() at ObjectCreationList.cpp:~1339 to prevent similar potential crashes in related code paths.

Fixes CLIENT-57N

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

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.

0 participants