X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/733b8ed3f9757ce3b7197e0ab203a6b05f3469d7..93d2bf4406e5f850189f827275c66ef99bb64791:/src/common/stream.cpp 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;