Prevent a potential crash when parsing a materials xml containing mistakes

Right now, if you have a program referencing a nonexistent shader, it just crashes.