Closed CoroNaut closed 3 weeks ago
/Confirmed
It blows up in item.cpp operation item::update_link_traits when trying to use get_use("link_up")->get_actor_ptr()
when get_use returned a null pointer. The item in question is the turned on smart lamp.
The problem is caused by the operation being called with the turned on smart lamp, while the "link_up" action is defined on the turn off version. Hacking the JSON to add "link_up" to the turned on version causes the game to say the lamp is turned on when turned on.
Electric carver has the action on both the off and on versions. Same for:
Given the precedents, it seems the action should be defined in all versions of the item. PR upcoming...
Describe the bug
As title, turning on a smart lamp while it is plugged into a grid or vehicle will cause segfault
Attach save file
TESTING-trimmed.tar.gz
Steps to reproduce
Expected behavior
No segfault when turning on a lamp. Lamp deserves to be lit! LAMP!
Screenshots
No response
Versions and configuration
Additional context
crash.log