SwEndNoteOptionPage::Reset() looks up a widget named "allstyles" to hide style pickers on Web documents, but that id was renamed without updating the C++ lookup, leaving m_xStylesContainer always null. For .odt documents the dead pointer is never touched. For HTML documents the SwWebDocShell branch dereferences it via m_xStylesContainer->hide(), crashing LibreOffice on open. Guard the dereference with a null check, and restore the "allstyles" id on endnotepage.ui so the hide-on-web behaviour works again for the Endnotes tab. Change-Id: I2eb54d66b06eef603c952522cea81479c6ee5088 Signed-off-by: Sofia Gazizova <sgaziz@altlinux.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208463 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>