Attorney: Slain Texas prosecutor feared for life, brought gun to work