fix-nullptr
This commit is contained in:
parent
ca04e572be
commit
a29515f72e
|
@ -6,7 +6,7 @@
|
||||||
<LocalDebuggerCommandArguments>--path "D:\Projects\Cpp\WsNovelParser\x64\test_file" --dest E:\</LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>--path "D:\Projects\Cpp\WsNovelParser\x64\test_file" --dest E:\</LocalDebuggerCommandArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LocalDebuggerCommandArguments>--path "D:\CustomNovels\科学+修仙+创造世界" --dest E:\</LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>--path "D:\Projects\Cpp\WsNovelParser\x64\test_file" --dest E:\</LocalDebuggerCommandArguments>
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -339,12 +339,13 @@ void MatchCursor::enterExprs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void lib_syntax::MatchCursor::logExprsError(std::shared_ptr<const lib_words::IPrimitiveWord> t, const QString& msg) {
|
void lib_syntax::MatchCursor::logExprsError(std::shared_ptr<const lib_words::IPrimitiveWord> t, const QString& msg) {
|
||||||
if(!this->_total_errors.contains(t->position()))
|
auto pos_key = t?t->position():0;
|
||||||
this->_total_errors[t->position()] = QStringList();
|
if(!this->_total_errors.contains(pos_key))
|
||||||
|
this->_total_errors[pos_key] = QStringList();
|
||||||
|
|
||||||
auto exists = this->_total_errors[t->position()];
|
auto exists = this->_total_errors[pos_key];
|
||||||
exists.append(msg);
|
exists.append(msg);
|
||||||
this->_total_errors[t->position()] = exists;
|
this->_total_errors[pos_key] = exists;
|
||||||
|
|
||||||
this->_exprs_errors.last()->addError(t, msg);
|
this->_exprs_errors.last()->addError(t, msg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue