mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Make a weak pointer for GApplication startup lambda
Or it never gets destroyed
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user