Bug 711198 - Crashes on creating a new task

(cherry picked from commit 5b70c20382267590e3ccdc748a49ba9abce6ea11)