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/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to