summaryrefslogtreecommitdiff
diff options
-rw-r--r--launcher/ApplicationLauncherIcon.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp
index 9010f3c02..ede26baf8 100644
--- a/launcher/ApplicationLauncherIcon.cpp
+++ b/launcher/ApplicationLauncherIcon.cpp
@@ -559,14 +559,13 @@ void ApplicationLauncherIcon::UpdateDesktopFile()
g_file_monitor_set_rate_limit(_desktop_file_monitor, 2000);
_gsignals.Add<void, GFileMonitor*, GFile*, GFile*, GFileMonitorEvent>(_desktop_file_monitor, "changed",
- [this] (GFileMonitor*, GFile* f, GFile*, GFileMonitorEvent event_type) {
+ [this, desktop_file] (GFileMonitor*, GFile*, GFile*, GFileMonitorEvent event_type) {
switch (event_type)
{
case G_FILE_MONITOR_EVENT_DELETED:
{
- glib::Object<GFile> file(f, glib::AddRef());
- _source_manager.AddTimeoutSeconds(1, [this, file] {
- if (!g_file_query_exists(file, nullptr))
+ _source_manager.AddTimeoutSeconds(1, [this, desktop_file] {
+ if (!g_file_query_exists(desktop_file, nullptr))
{
UnStick();
LogUnityEvent(ApplicationEventType::DELETE);