This is with reference to the question Adjust logo height to match \frametitle box height This excellent solution works exactly in a way I want. However when I use the environment
\begin{block}
\end{block}
in any frame, it gives an error that mybox
is already defined. So how the code can be modified to remove the error.