Protect debug message window against receving messages from wrong thread
Authored by: tfry 2014-10-29
Parent: [r4974]
Child: [r4976]