If you have a mortgage free house and sell it (or gift it) to anyone for less than its proper market value then the Official Receiver in your bankruptcy will want to undo the transaction in order to release funds for your creditors. If you do sell it for market value the OR will want to know what you have done with the money, as you should have used it to pay off your creditors.
However, as your wife has contributed to the house mortgage she has a beneficial interest, so not all of the value would be considered to be yours. This would not necessarily prevent the OR taking and selling the house, but it would mean that only the part of the proceeds which was your equity would be taken for the creditors (& for the ORs costs - which are large)
This whole issue can become quite complex & you really need advice from a specialist debt adviser - local CAB or other free advice agency.