The bank should have refused the cheque as once it clears in his account he could argue that you have no legal right to money in his account. As you say, you're not named on it so under normal circumstances nothing in there is legally yours.
If the worst comes to the worst, complain to the bank, demand a photocopy of the cheque and insist that they completely cancel the credit or at least give you a bankers draft/electronic payment for half.
Did you anything with the cheque to "sign it over" to him?