Fixing a crash in ShowDialogAction

The previous change to delete pDialog has an edge-case it brought to
light where we were expecting pDialog to still exist even though we're
not actually really doing anything with it.  We should make
ShowDialogAction resilient against a NULL pDialog and not crash if it's
NULL.