Disable Growl notifications if register() fails - this prevents a deadlock on growler->notify()

This commit is contained in:
Alessandro Ranellucci 2015-01-01 12:37:38 +01:00
parent 1eac452d71
commit 93687c1491

View File

@ -14,6 +14,8 @@ sub BUILD {
$self->growler(Growl::GNTP->new(AppName => 'Slic3r', AppIcon => $icon));
$self->growler->register([{Name => 'SKEIN_DONE', DisplayName => 'Slicing Done'}]);
};
# if register() fails (for example because of a timeout), disable growler at all
$self->growler(undef) if $@;
}
}