X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/733b8ed3f9757ce3b7197e0ab203a6b05f3469d7..8f17876f2b49e831d817e0ce683ae4f4d1ee9fb1:/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;