X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/243dbf1a5088be31980df51b97831b52cb6986cd..7475e8146203b9f75ea01247eb456209ed7b7c13:/src/motif/combobox.cpp?ds=sidebyside diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 61dce03a2b..e4ec22c7da 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "combobox.h" #endif @@ -155,7 +155,8 @@ int wxComboBox::DoInsert(const wxString& item, int pos) wxXmString str( item.c_str() ); XmComboBoxAddItem((Widget) m_mainWidget, str(), pos+1); - m_stringList.Insert(pos, item); + wxChar* copy = wxStrcpy(new wxChar[item.length() + 1], item.c_str()); + m_stringList.Insert(pos, copy); m_noStrings ++; return pos;