Fix crash on start

This commit is contained in:
proller 2017-08-01 16:31:38 +03:00 committed by alexey-milovidov
parent 9a546b5414
commit db984d92a8

View File

@ -50,19 +50,22 @@ public:
};
class StringHolder {
protected:
std::string ss;
};
/// Creates the string by itself and allows to get it.
class WriteBufferFromOwnString : public WriteBufferFromString
class WriteBufferFromOwnString : public StringHolder, public WriteBufferFromString
{
private:
std::string s;
public:
WriteBufferFromOwnString() : WriteBufferFromString(s) {}
WriteBufferFromOwnString() : WriteBufferFromString(ss) {}
std::string & str()
{
finish();
return s;
return ss;
}
};