Diffusion GpgOL 456cdf6165ef

Check first for view before accessing selection

Authored by aheinecke on Feb 27 2018, 7:06 AM.

Description

Check first for view before accessing selection

* src/ribbon-callbacks.cpp (get_mail_from_control): Only
access the item selection after we checked if we have a
preview pane / word editor.

The selection.Item(x) call can trigger a load / unload event
cycle. This is expensive and should be avoided if not
necessary. Also in the Outbox this somehow prevents
sending a mail.