avoid DBus related crash on Ubuntu #954

An undocumented feature of Net::DBus->session() is that it returns
the same connection object it creates the first time it's called for
all subsequent calls. Somehow this exposes us to a bug where unref()
is called on that object too many times, causing a segfault.
Undefining the cached object after we've used it once avoids this.
This commit is contained in:
Mike Sheldrake 2013-01-25 12:29:44 -08:00
parent 18280da1b3
commit 599d76b70b

View File

@ -413,6 +413,7 @@ sub notify {
my $notifier = $serv->get_object('/org/freedesktop/Notifications',
'org.freedesktop.Notifications');
$notifier->Notify('Slic3r', 0, $self->{icon}, $title, $message, [], {}, -1);
undef $Net::DBus::bus_session;
}
};
}