csv: avoid invalid dereference
This commit is contained in:
parent
39d199aa49
commit
41663b1941
1 changed files with 3 additions and 1 deletions
|
@ -303,7 +303,9 @@ void csv_datasource::parse_csv(T& stream,
|
||||||
{
|
{
|
||||||
Tokenizer tok(csv_line, grammer);
|
Tokenizer tok(csv_line, grammer);
|
||||||
Tokenizer::iterator beg = tok.begin();
|
Tokenizer::iterator beg = tok.begin();
|
||||||
std::string val = boost::trim_copy(*beg);
|
std::string val;
|
||||||
|
if (beg != tok.end())
|
||||||
|
val = boost::trim_copy(*beg);
|
||||||
|
|
||||||
// skip blank lines
|
// skip blank lines
|
||||||
if (val.empty())
|
if (val.empty())
|
||||||
|
|
Loading…
Reference in a new issue