Resolve issue #163: Material Editor Crash- Opening the material editor with a mesh selected doesn't open a custom material.

Fixed a possible assert on changing material, and we now map the material to the MATMGR by name instead of type.