Crash in lightattrib.cxx + fix

Fix applied, with our enthusiastic thanks.

Note, by the way, that upcastToPandaNode() hasn’t been necessary since Panda3D version 1.1.

David