Skip to content

Commit

Permalink
xrGame/PhraseDialog.cpp: Added a checking bad phrase structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ChugunovRoman committed Dec 7, 2023
1 parent 466fe12 commit 6e13116
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/xrGame/PhraseDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,17 @@ CPhrase* CPhraseDialog::AddPhrase(
{
CPhrase* phrase = NULL;
CPhraseGraph::CVertex* _vertex = data()->m_PhraseGraph.vertex(phrase_id);
if (!_vertex)
{
phrase = xr_new<CPhrase>();
VERIFY(phrase);
phrase->SetID(phrase_id);

phrase->SetText(text);
phrase->SetGoodwillLevel(goodwil_level);
VERIFY2(!_vertex, make_string("Dublicate phrase ID: [%s] for phrase: [%s]. Existed phrase by this ID: [%s]", phrase_id.c_str(), text, _vertex->data()->GetText()));

data()->m_PhraseGraph.add_vertex(phrase, phrase_id);
}
phrase = xr_new<CPhrase>();
VERIFY(phrase);
phrase->SetID(phrase_id);

phrase->SetText(text);
phrase->SetGoodwillLevel(goodwil_level);

data()->m_PhraseGraph.add_vertex(phrase, phrase_id);

if (prev_phrase_id != "")
data()->m_PhraseGraph.add_edge(prev_phrase_id, phrase_id, 0.f);
Expand Down

0 comments on commit 6e13116

Please sign in to comment.