wxGrid::~wxGrid()
{
+ if ( m_winCapture )
+ m_winCapture->ReleaseMouse();
+
// Ensure that the editor control is destroyed before the grid is,
// otherwise we crash later when the editor tries to do something with the
// half destroyed grid
if ( m_winCapture )
{
- if (m_winCapture->HasCapture())
- m_winCapture->ReleaseMouse();
+ m_winCapture->ReleaseMouse();
m_winCapture = NULL;
}
{
if (m_winCapture)
{
- if (m_winCapture->HasCapture())
- m_winCapture->ReleaseMouse();
+ m_winCapture->ReleaseMouse();
m_winCapture = NULL;
}