Adultery is when someone cheats on their spouse, so by getting a divorce you are in fact avoiding the adultery problem. Whether or not this solves the problems within your marriage is another issue. I believe that if adultery is committed, it is going to be very hard to save your marriage. Not impossible, but difficult.
Divorce can not avoid the problem of adultery because it means that unfaithfulness to the marrige which is legal grounds for a divorce. In divorce cases, the reason for the marriage disolution is most often irreconcilable differences or adultery. Irreconcilable differences ane adultery are the two causation of divorce problems.