Avoid nasty use-after-delete crashes when starting commands
This change defers the actual start of the command and returns immediately to avoid problems if the caller, e.g. an action of a menu, is deleted before start returns. This problem occurred with the KeyToCardCommand which is started by a lambda of an action in a context menu. This context menu is deleted when it's hidden. KeyToCardCommand's start opens a message box which triggers the hiding (and deletion) of the menu. When the message box is closed, KeyToCardCommand's start returns to the deleted context menu (which may or may not cause a crash or an abort; e.g. libc aborted the application with "malloc(): unaligned tcache chunk detected"). GnuPG-bug-id: 6281
Please register or sign in to comment