Setting pDialogObj to null when dismissing the dialog