tdf#22919 crash on insert picture from the gallery

regression from commit
    commit 1b7bcaa714f0af45c6a9660d1f0940cb7931ba0f
    use unique_ptr in svx

Change-Id: Ie3ced1f13ae3d35205174a02d6cbc2c19a171871
Reviewed-on: https://gerrit.libreoffice.org/67498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 83b0bea..3b61f63 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1081,9 +1081,9 @@ void GalleryBrowser2::DispatchAdd(
    pInfo->Arguments = aArgs;
    pInfo->Dispatch = xDispatch;

    if ( !Application::PostUserEvent(
    if ( Application::PostUserEvent(
            LINK( nullptr, GalleryBrowser2, AsyncDispatch_Impl), pInfo.get() ) )
        pInfo.reset();
        pInfo.release();
}

void GalleryBrowser2::Execute(const OString &rIdent)