mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 00:55:12 +00:00
Destroy InputField::Inner before InputField.
Inner has a pointer to parent and uses it assuming it is InputField. If Inner lives longer than InputField (till ~QWidget) then in some cases it accesses InputField as a (not completely) destroyed object.
This commit is contained in:
@@ -297,6 +297,8 @@ public:
|
||||
int scrollTopMax() const;
|
||||
void scrollTo(int top);
|
||||
|
||||
~InputField();
|
||||
|
||||
private slots:
|
||||
void onTouchTimer();
|
||||
|
||||
@@ -413,7 +415,7 @@ private:
|
||||
bool _forcePlaceholderHidden = false;
|
||||
bool _reverseMarkdownReplacement = false;
|
||||
|
||||
object_ptr<Inner> _inner;
|
||||
const std::unique_ptr<Inner> _inner;
|
||||
|
||||
TextWithTags _lastTextWithTags;
|
||||
std::vector<MarkdownTag> _lastMarkdownTags;
|
||||
|
Reference in New Issue
Block a user