I legally changed my name 5 years ago and have been filing under my new name since. This is the first year I've not used direct deposit, and my state return came with my old name on it.
I suggest you contact your state department of revenue. You may have to request a new check. I am not sure if your bank would cash the check as it is. They might if you had verification of your former and current name (such as court documents).