]> git.saurik.com Git - wxWidgets.git/commitdiff
add some asserts for wxStringBufferLength
authorRyan Norton <wxprojects@comcast.net>
Fri, 29 Oct 2004 05:52:16 +0000 (05:52 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 29 Oct 2004 05:52:16 +0000 (05:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index a31f122bcc89ee080361b6d237861bd0e57ccfa3..309b27820ad368b219ae366e69d16aa2e20ba3b4 100644 (file)
@@ -1380,7 +1380,10 @@ class WXDLLIMPEXP_BASE wxStringBufferLength
 public:
     wxStringBufferLength(wxString& str, size_t lenWanted = 1024)
         : m_str(str), m_buf(NULL), m_len(0), m_lenSet(false)
-        { m_buf = m_str.GetWriteBuf(lenWanted); }
+    { 
+        m_buf = m_str.GetWriteBuf(lenWanted); 
+        wxASSERT(m_buf != NULL);
+    }
 
     ~wxStringBufferLength()
     {