Fixed null reference exception
Merge pull request #72 from don-mccomb/bug1206003

Fix bug #1206003: Crash after text, paintbrush and undo