diff options
author | kenneth@hexad.dk <kenneth@hexad.dk@59da171f-624f-0410-aa54-27559c288bec> | 2012-09-08 14:57:15 +0400 |
---|---|---|
committer | kenneth@hexad.dk <kenneth@hexad.dk@59da171f-624f-0410-aa54-27559c288bec> | 2012-09-08 14:57:15 +0400 |
commit | baba06dc230d359f63e95ad538b59b7721b1a6bc (patch) | |
tree | 75d87a8d3e963dee484e5801c4b29d672207dcae | |
parent | fcf9c932a349793683c52a997d73a8402f07b6a5 (diff) |
Workaround for crash in tray icon when showing balloon notification.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1452 59da171f-624f-0410-aa54-27559c288bec
-rw-r--r-- | Duplicati/GUI/MainForm.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Duplicati/GUI/MainForm.cs b/Duplicati/GUI/MainForm.cs index 44046c83c..e2980f0f3 100644 --- a/Duplicati/GUI/MainForm.cs +++ b/Duplicati/GUI/MainForm.cs @@ -228,13 +228,24 @@ namespace Duplicati.GUI return;
}
- Datamodel.ApplicationSettings.NotificationLevel level = m_settings.BallonNotificationLevel;
-
string name = "";
//Dirty read of the instance variable
try { name = Program.WorkThread.CurrentTask.Schedule.Name; }
- catch {}
+ catch { }
+
+ Datamodel.ApplicationSettings.NotificationLevel level;
+ try { level = m_settings.BallonNotificationLevel; }
+ catch
+ {
+ m_settings = new Datamodel.ApplicationSettings(Program.DataConnection);
+ try { level = m_settings.BallonNotificationLevel; }
+ catch
+ {
+ //TODO: Should find the cause for this, but at least we do not crash the process
+ return;
+ }
+ }
if (state == DuplicatiRunner.RunnerState.Started && (level == Duplicati.Datamodel.ApplicationSettings.NotificationLevel.StartAndStop || level == Duplicati.Datamodel.ApplicationSettings.NotificationLevel.Start || level == Duplicati.Datamodel.ApplicationSettings.NotificationLevel.Continous))
|