2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix crash in SelfDestructionBox.

base::lambda_guarded may destroy the lambda after the owner. In case
of SelfDestructionBox it lead to a dtor of a dangling object_ptr.

MTP::Sender destroys the lambda handlers together with itself.
This commit is contained in:
John Preston
2017-03-23 15:15:21 +03:00
parent e9ec09b91a
commit e38d683979
2 changed files with 4 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once
#include "boxes/abstractbox.h"
#include "mtproto/sender.h"
namespace Ui {
class RadiobuttonGroup;
@@ -28,7 +29,7 @@ class Radiobutton;
class FlatLabel;
} // namespace Ui
class SelfDestructionBox : public BoxContent {
class SelfDestructionBox : public BoxContent, private MTP::Sender {
Q_OBJECT
public: