Merge "Prevent crash in Dialog. Bug #2249637"