Only register and use the Sidebar if it is globally enabled.
diff --git a/include/sfx2/sidebar/SidebarChildWindow.hxx b/include/sfx2/sidebar/SidebarChildWindow.hxx
index 194f098..0d9739d 100644
--- a/include/sfx2/sidebar/SidebarChildWindow.hxx
+++ b/include/sfx2/sidebar/SidebarChildWindow.hxx
@@ -39,6 +39,8 @@ public:
        SfxBindings* pBindings,
        SfxChildWinInfo* pInfo);

    static void RegisterChildWindowIfEnabled (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0);

    SFX_DECL_CHILDWINDOW_WITHID(SidebarChildWindow);

    static sal_Int32 GetDefaultWidth (Window* pWindow);
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 897a59f..b31a45e 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -229,7 +229,7 @@ void ScDLL::Init()

    // common SFX controller
    ::sfx2::TaskPaneWrapper::RegisterChildWindow( false, pMod );
    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(false, pMod);
    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindowIfEnabled(false, pMod);

    // Svx-StatusBar-Controller
    SvxInsertStatusBarControl       ::RegisterControl(SID_ATTR_INSERT,      pMod);
diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx
index d28257d..78c78ea 100644
--- a/sd/source/ui/app/sddll2.cxx
+++ b/sd/source/ui/app/sddll2.cxx
@@ -127,7 +127,7 @@ void SdDLL::RegisterControllers()
    ::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod);
    ::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod);
    ::sd::ToolPanelChildWindow::RegisterChildWindow(0, pMod);
    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(0, pMod);
    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindowIfEnabled(0, pMod);

    SvxFillToolBoxControl::RegisterControl(0, pMod);
    SvxLineStyleToolBoxControl::RegisterControl(0, pMod);
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index cb001ce..dfaff1e 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -22,6 +22,7 @@
#include "sfx2/sfxsids.hrc"
#include "helpid.hrc"
#include "sfx2/dockwin.hxx"
#include "sfx2/viewfrm.hxx"
#include <sfx2/sidebar/ResourceDefinitions.hrc>


@@ -73,5 +74,12 @@ sal_Int32 SidebarChildWindow::GetDefaultWidth (Window* pWindow)
        return 0;
}

void SidebarChildWindow::RegisterChildWindowIfEnabled (sal_Bool bVisible,
						       SfxModule *pMod,
						       sal_uInt16 nFlags)
{
    if ( SfxViewFrame::IsSidebarEnabled() )
        RegisterChildWindow( bVisible, pMod, nFlags );
}

} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b8a9fb6..219f5dc 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/ui/UIElementFactoryManager.hpp>

#include <toolkit/unohlp.hxx>
#include <vcl/splitwin.hxx>
@@ -3410,13 +3411,32 @@ bool SfxViewFrame::IsSidebarEnabled()
    if (!bInitialized)
    {
        bInitialized = true;
        css::uno::Reference< css::uno::XComponentContext > xContext;
        xContext = ::comphelper::getProcessComponentContext();
        try {
            bEnabled = officecfg::Office::Common::Misc::ExperimentalSidebar::get(
                           comphelper::getProcessComponentContext());
            bEnabled = officecfg::Office::Common::Misc::ExperimentalSidebar::get( xContext );
        } catch (const uno::Exception &e) {
            SAL_WARN("sfx2.view", "don't have experimental sidebar option installed");
        }

        // rip out the services from framework/ for good measure
        if( !bEnabled )
        {
            try
            {
                uno::Reference< ui::XUIElementFactoryManager > xUIElementFactory = ui::UIElementFactoryManager::create( xContext );
                xUIElementFactory->deregisterFactory( "toolpanel", "ScPanelFactory", "" );
                xUIElementFactory->deregisterFactory( "toolpanel", "SwPanelFactory", "" );
                xUIElementFactory->deregisterFactory( "toolpanel", "SvxPanelFactory", "" );
                xUIElementFactory->deregisterFactory( "toolpanel", "SdPanelFactory", "" );
            }
            catch ( const uno::Exception &e )
            {
                SAL_WARN( "sfx2.view", "Exception de-registering sidebar factories " << e.Message );
            }
        }
    }

    return bEnabled;
}

diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 126cea5..fb53d18 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -400,7 +400,7 @@ void SwDLL::RegisterControls()
    ::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);

    SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(0, pMod);
    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindowIfEnabled(0, pMod);
    ::sfx2::TaskPaneWrapper::RegisterChildWindow(0, pMod);
}