SF.net SVN: mahogany: [7265] trunk/M/src/gui/wxOptionsDlg.cpp

[email protected]
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
Revision: 7265
          http://svn.sourceforge.net/mahogany/?rev=7265&view=rev
Author:   vadz
Date:     2007-05-02 08:32:08 -0700 (Wed, 02 May 2007)

Log Message:
-----------
fix a (harmless) assert failure due to using wxStaticCast with a NULL pointer

Modified Paths:
--------------
    trunk/M/src/gui/wxOptionsDlg.cpp

Modified: trunk/M/src/gui/wxOptionsDlg.cpp
===================================================================
--- trunk/M/src/gui/wxOptionsDlg.cpp	2007-05-02 13:56:07 UTC (rev 7264)
+++ trunk/M/src/gui/wxOptionsDlg.cpp	2007-05-02 15:32:08 UTC (rev 7265)
@@ -3797,19 +3797,22 @@
 #if defined(OS_WIN) && defined(USE_DIALUP)
    if ( bRc )
    {
-      wxCheckBox *chkDialUp =
-         wxStaticCast(GetControl(ConfigField_DialUpSupport), wxCheckBox);
-      if ( chkDialUp )
+      wxControl * const control = GetControl(ConfigField_DialUpSupport);
+      if ( control )
       {
-         if ( chkDialUp->GetValue() )
-            FillDialupConnections();
+         wxCheckBox * const chkDialUp = wxStaticCast(control, wxCheckBox);
+         if ( chkDialUp )
+         {
+            if ( chkDialUp->GetValue() )
+               FillDialupConnections();
 
-         Connect
-         (
-            chkDialUp->GetId(),
-            wxEVT_COMMAND_CHECKBOX_CLICKED,
-            wxCommandEventHandler(wxOptionsPageNetwork::OnDialUp)
-         );
+            Connect
+            (
+               chkDialUp->GetId(),
+               wxEVT_COMMAND_CHECKBOX_CLICKED,
+               wxCommandEventHandler(wxOptionsPageNetwork::OnDialUp)
+            );
+         }
       }
    }
 #endif // USE_DIALUP


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.