Fix crash bug in example by checking parse result. Bug 24516