Fix addtoolMaterial always adding null

Copy'n'paste error, since mat isn't reassigned it stays null.