X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/733b8ed3f9757ce3b7197e0ab203a6b05f3469d7..0ded6bb695f82a0b98d0862ec6870fc5c6cb8b97:/src/common/stream.cpp?ds=sidebyside diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 9c006b8f7a..a65c6154d8 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -95,7 +95,14 @@ wxStreamBuffer::wxStreamBuffer(BufMode mode) { Init(); - m_stream = new wxStreamBase; + wxASSERT_MSG(mode != read_write, wxT("you have to use the other ctor for read_write mode") ); + if ( mode == read ) + m_stream = new wxInputStream; + else if ( mode == write) + m_stream = new wxOutputStream; + else + m_stream = NULL; + m_mode = mode; m_flushable = FALSE;