II have the same problem and opened a different thread because yours was not immediately recognizable as the same one.
I "fixed" it by adding an extra condition to an "if" statement. It's not a proper fix, but at least the game doesn't crash. Currently it outputs a depleted fuel cell every other time, which is sub-optimal, but OK for now. May be I'll find a better fix. Check the other thread for details.