Fix get_story_force.

This commit is contained in:
levlam 2023-07-15 03:46:25 +03:00
parent 74e83d45ce
commit bf3337f21c

View File

@ -1090,9 +1090,9 @@ StoryManager::Story *StoryManager::get_story_force(StoryFullId story_full_id, co
return nullptr; return nullptr;
} }
auto result = get_story_editable(story_full_id); auto story = get_story_editable(story_full_id);
if (result != nullptr) { if (story != nullptr && story->content_ != nullptr) {
return result; return story;
} }
if (!G()->use_message_database() || is_inaccessible_story(story_full_id) || if (!G()->use_message_database() || is_inaccessible_story(story_full_id) ||
@ -1154,7 +1154,7 @@ StoryManager::Story *StoryManager::on_get_story_from_database(StoryFullId story_
} }
auto old_story = get_story_editable(story_full_id); auto old_story = get_story_editable(story_full_id);
if (old_story != nullptr) { if (old_story != nullptr && old_story->content_ != nullptr) {
return old_story; return old_story;
} }