diff --git a/src/preferences/mail/ConfigViews.cpp b/src/preferences/mail/ConfigViews.cpp index 618265efa8..5df3f1ff3d 100644 --- a/src/preferences/mail/ConfigViews.cpp +++ b/src/preferences/mail/ConfigViews.cpp @@ -164,7 +164,8 @@ ProtocolSettingsView::DetachedFromWindow() fSettings.MakeEmpty(); fSettings.Append(settings); - RemoveChild(fSettingsView); + // We need to remove the settings view before unloading its add-on + fSettingsView->RemoveSelf(); delete fSettingsView; fSettingsView = NULL; unload_add_on(fImage);