Add a missing null pointer check in one of the dialog box functions.