When releasing a video render control or a video window control, we
were deleting the object pointed to by the 'control' pointer, but
were not setting this pointer to 0 which left it dangling. Shortly
after we tried to cast this dangling pointer to another type which
crashed. The solution is just to return after deleting the control.
Change-Id: I9ab672c8b86a13af889d87c76141e6b8db5b74a7
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
m_videoRendererControl->setSurface(0);
delete m_videoRendererControl;
m_videoRendererControl = 0;
+ return;
#if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (control == m_videoWindowControl) {
delete m_videoWindowControl;
m_videoWindowControl = 0;
+ return;
#endif
}