Skip to content

Commit bbcd27d

Browse files
committed
Fix possible crash in restrictions.
1 parent 837a352 commit bbcd27d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,11 +2325,17 @@ void SetupRestrictionView(
23252325
) | rpl::start_with_next([=](Controls::WriteRestriction value) {
23262326
using Type = Controls::WriteRestriction::Type;
23272327
if (value.type == Type::Frozen) {
2328+
state->icon = nullptr;
2329+
state->unlock = nullptr;
2330+
state->label = nullptr;
23282331
state->button = FrozenWriteRestriction(
23292332
widget,
23302333
show,
23312334
FrozenWriteRestrictionType::MessageField);
23322335
} else if (const auto lifting = value.boostsToLift) {
2336+
state->icon = nullptr;
2337+
state->unlock = nullptr;
2338+
state->label = nullptr;
23332339
state->button = BoostsToLiftWriteRestriction(
23342340
widget,
23352341
show,

0 commit comments

Comments
 (0)