git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4151
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ void Disconnect(void) { m_DupMan = NULL; }
void OnTerminate(int WXUNUSED(pid), int WXUNUSED(status)) const
{
void OnTerminate(int WXUNUSED(pid), int WXUNUSED(status)) const
{
- m_DupMan->m_DialProcess = NULL;
- m_DupMan->CheckStatus(TRUE);
+ if(m_DupMan)
+ {
+ m_DupMan->m_DialProcess = NULL;
+ m_DupMan->CheckStatus(TRUE);
+ }
}
private:
wxDialUpManagerImpl *m_DupMan;
}
private:
wxDialUpManagerImpl *m_DupMan;
wxDialUpManagerImpl::wxDialUpManagerImpl()
{
wxDialUpManagerImpl::wxDialUpManagerImpl()
{
- m_IsOnline = -1; // unknown
+ m_IsOnline = -2; // -1 or -2, unknown
m_DialProcess = NULL;
m_timer = NULL;
m_CanUseIfconfig = -1; // unknown
m_DialProcess = NULL;
m_timer = NULL;
m_CanUseIfconfig = -1; // unknown
wxDialUpManagerImpl::~wxDialUpManagerImpl()
{
if(m_timer) delete m_timer;
wxDialUpManagerImpl::~wxDialUpManagerImpl()
{
if(m_timer) delete m_timer;
- if(m_DialProcess) m_DialProcess->Detach();
+ if(m_DialProcess)
+ {
+ m_DialProcess->Disconnect();
+ m_DialProcess->Detach();
+ }
( /* non-const */ (wxDialUpManagerImpl *)this)->CheckStatusInternal();
// now send the events as appropriate:
( /* non-const */ (wxDialUpManagerImpl *)this)->CheckStatusInternal();
// now send the events as appropriate:
- if(m_IsOnline != oldIsOnline && oldIsOnline != -1)
+ if(m_IsOnline != oldIsOnline && m_IsOnline != -1 && oldIsOnline != -2) // -2: first time!
{
wxDialUpEvent event(m_IsOnline, ! fromAsync);
(void)wxTheApp->ProcessEvent(event);
{
wxDialUpEvent event(m_IsOnline, ! fromAsync);
(void)wxTheApp->ProcessEvent(event);