Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2289/src/gui

Modified Files:
        wxComposeView.cpp 
Log Message:
fixed crash when first adding custom header and then removing it using Ctrl-H 
in the composer

Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.387
retrieving revision 1.388
diff -b -u -2 -r1.387 -r1.388
--- wxComposeView.cpp   15 May 2005 21:18:23 -0000      1.387
+++ wxComposeView.cpp   11 Jul 2005 22:44:04 -0000      1.388
@@ -4397,7 +4397,8 @@
    // first check if we don't already have a header with this name
    const kbStringList::iterator end = m_extraHeadersNames.end();
-   kbStringList::iterator i, j;
-   for ( i = m_extraHeadersNames.begin(),
-         j = m_extraHeadersValues.begin(); i != end; ++i, ++j )
+   for ( kbStringList::iterator i = m_extraHeadersNames.begin(),
+                                j = m_extraHeadersValues.begin();
+         i != end;
+         ++i, ++j )
    {
       if ( **i == name )
@@ -4413,14 +4414,11 @@
             **j = value;
          }
-         break;
+         return;
       }
    }
 
    // if we didn't find it, add a new one
-   if ( i == end )
-   {
       m_extraHeadersNames.push_back(new String(name));
       m_extraHeadersValues.push_back(new String(value));
-   }
 }
 



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to