Conditionally print subsection in Beamer
I have replaced the code snippet with
\ifx\insertsubsection\empty\else%
\ifdefempty{\subsecname}{\relax}{%
~--~\insertsubsectionhead%
}%
\fi
and IT WORKS!!!
Unfortunately needs the etoolbox
package to be loaded...
EDIT:
\setbox0=\hbox{\subsecname\unskip}\ifdim\wd0=0pt\else%
~--~\insertsubsectionhead%
\fi%
also works and does not require etoolbox
.
I don't know if this is the "cleaner" solution.