@@ -211,9 +211,16 @@ private void KeyPromptFormAdded()
211211 //==> Update window might be shown AFTER "Open Database" window is shown
212212 if ( PluginConfig . CheckSync )
213213 {
214+ PluginDebug . AddInfo ( "UpdateCheck start" , 0 , DebugPrint ) ;
214215 m_bRestartInvoke = true ;
215- m_slUpdateCheck = CreateUpdateCheckLogger ( ) ;
216- PluginDebug . AddInfo ( "UpdateCheck start" , DebugPrint ) ;
216+ try
217+ {
218+ m_slUpdateCheck = CreateUpdateCheckLogger ( ) ;
219+ }
220+ catch ( Exception ex )
221+ {
222+ PluginDebug . AddError ( "UpdateCheck error" , 0 , "Initialising StatusLogger failed" , ex . Message , DebugPrint ) ;
223+ }
217224 ThreadPool . QueueUserWorkItem ( new WaitCallback ( CheckForUpdates ) ) ;
218225 while ( true )
219226 {
@@ -225,7 +232,7 @@ private void KeyPromptFormAdded()
225232 }
226233 }
227234 if ( m_slUpdateCheck != null ) m_slUpdateCheck . EndLogging ( ) ;
228- PluginDebug . AddInfo ( "UpdateCheck finished " , DebugPrint ) ;
235+ PluginDebug . AddInfo ( "UpdateCheck finished " , 0 , DebugPrint ) ;
229236 }
230237 if ( ( m_UpdateCheckStatus == UpdateCheckStatus . NotChecked ) || ( m_UpdateCheckStatus == UpdateCheckStatus . Error ) ) UpdateCheckEx . Run ( false , null ) ;
231238 CheckPluginLanguages ( ) ;
@@ -283,7 +290,7 @@ private UpdateCheckType UpdateCheckRequired()
283290
284291 private IStatusLogger CreateUpdateCheckLogger ( )
285292 {
286- IStatusLogger sl = StatusUtil . CreateStatusDialog ( m_host . MainWindow , out m_CheckProgress ,
293+ IStatusLogger sl = StatusUtil . CreateStatusDialog ( null , out m_CheckProgress ,
287294 KeePass . Resources . KPRes . UpdateCheck , KeePass . Resources . KPRes . CheckingForUpd + "..." , true , true ) ;
288295 Button btnCancel = ( Button ) Tools . GetControl ( "m_btnCancel" , m_CheckProgress ) ;
289296 if ( btnCancel != null )
0 commit comments