My advice would be the same as for someone who submitted a paper to a journal and then spotted a mistake:
Make a note of the error, and the "next point in the process" where you can naturally make changes, fix the mistake in the document.
For a thesis, that next point in the process might be after your professor reads it but before it is officially submitted to the university; or it might be before the thesis is bound for the library; or it might be after the thesis itself is final but before a paper based on it is sent to a journal; or it might be that the thesis is completely final but there is a place to publish errata. Or it might be never. (As other answers have pointed out, final documents with errors are common.)
My advice also includes the encouragement not to stress about the grade. The grade is an arbitrary number that measures not how worthy you are as a person, nor even how good the thesis could have been if it were flawless. It simply measures (one person's opinion of) how good a specific imperfect manuscript is. So you found a mistake in your manuscript; and there are probably others you didn't find. Oh well, you did your best, and it's not a big deal!