mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Make a weak pointer for GApplication startup lambda
Or it never gets destroyed
This commit is contained in:
parent
5fc10c934a
commit
3cb49127f4
1 changed files with 6 additions and 1 deletions
|
@ -222,7 +222,12 @@ void LinuxIntegration::LaunchNativeApplication() {
|
|||
G_APPLICATION_HANDLES_OPEN,
|
||||
nullptr)));
|
||||
|
||||
app->signal_startup().connect([=] {
|
||||
app->signal_startup().connect([weak = std::weak_ptr(app)] {
|
||||
const auto app = weak.lock();
|
||||
if (!app) {
|
||||
return;
|
||||
}
|
||||
|
||||
// GNotification
|
||||
InvokeQueued(qApp, [] {
|
||||
Core::App().notifications().createManager();
|
||||
|
|
Loading…
Add table
Reference in a new issue