summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-03-06 10:53:32 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-03-06 10:53:32 +0300
commit7fa3372fc1b0ee5b0f70c2bfb495cb922ca499e3 (patch)
tree705fa44e2c39963fd29ec6246da4d9bea3975ba6
parent06a86a12c757b2b77e994772c3bd7e2583f7f7a9 (diff)
code cleaning
-rw-r--r--plugins/NewStory/src/history_array.cpp3
-rw-r--r--plugins/NewStory/src/history_control.cpp3
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp
index e82dade5aa..195cf55896 100644
--- a/plugins/NewStory/src/history_array.cpp
+++ b/plugins/NewStory/src/history_array.cpp
@@ -515,9 +515,6 @@ void HistoryArray::clear()
void HistoryArray::addChatEvent(SESSION_INFO *si, const LOGINFO *lin)
{
- if (si == nullptr)
- return;
-
int numItems = getCount();
auto &p = allocateItem();
p.hContact = si->hContact;
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index c31c0a0e0d..e5108cc7d3 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -109,6 +109,9 @@ void NewstoryListData::OnResize(int newWidth, int newHeight)
void NewstoryListData::AddChatEvent(SESSION_INFO *si, const LOGINFO *lin)
{
+ if (si == nullptr)
+ return;
+
ScheduleDraw();
items.addChatEvent(si, lin);
totalCount++;