Fix for Issue #163 for crash on selecting custom material.

This fix is only for crash on re-selecting custom material.  The problem with custom material appears broken when switch focus from the object to another or follow repro steps stated in the issue description is under investigation.