Skip to content

[Bug] Game crashes when a null object is attempted to be logged with FlixelLogger #61

@stringdotjar

Description

@stringdotjar

Bug Description

When info(), warn(), and error() attempt to log a null object in FlixelLogger, it crashes the game. This is because since any log method can take a generic object, it naturally calls toString() on it.

Steps to Reproduce

Simply use Flixel.info(null), Flixel.warn(null) or Flixel.error(null).

Expected Behavior

It should prevent it and instead just print null in the console.

Logs or Screenshots

Image

FlixelGDX Version

1.0.0

Platform

Other (please specify in description)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreCore logic module of the frameworkrefactorParts of the code need to be moved, enhanced, changed, or removedtop priorityMust be completed immediately

Projects

Status

✅ Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions