Fix for Issue #20. (Crash in wxAUIManager::OnLeftUp)