bug1206003: Crash after text, paintbrush and undo

Fixed null reference exception.