Joseph Smith said: “I will give you one of the Keys of the mysteries of the KIngdom. It is an eternal principle, that has existed with God from all eternity: That man who rises up to condemn others, finding fault with the Church, saying that they are out of the way, while he himself is righteous, then know assuredly, that that man is in the high road to apostasy; and if he does not repent, will apostatize, as God lives.” 1
This famous statement, made by the prophet on 2 July 1839, is often quoted to members who are critical of you [general authorities] as a warning that criticism can lead to apostasy. But this twists the original meaning and purpose of the statement.
Joseph Smith did not say these words to church members who were critical of their leaders. He said them to church leaders - to apostles and seventies - who were critical of church members.
He warned leaders of the church not to put themselves above others, not to condemn others, not to find fault with the church, not to say that members are out of the way while leaders are righteous.
The whole article is worth reading: Dialogue: A Plea to the Leaders of the Church, by Paul Toscano