dialog to be deleted never passed to destroy

Change-Id: Iee6c43aa192ae4d99872769f9cf8564c603165fb
(cherry picked from commit 2caaf644e847b2bded91a12976c1dec854d51eb5)