CGE2: Fix possible null pointer dereference.