[Libreoffice-commits] core.git: vcl/source
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 31 14:45:39 UTC 2020
vcl/source/components/dtranscomp.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 491fa499d6b957b9c8f03fece5ed06d5932e9448
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Jul 31 15:04:57 2020 +0200
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Jul 31 16:45:06 2020 +0200
tdf#135212 Don't crash when unable to create clipboard
Gracefully handle the case where the SalInstance returns an
empty Reference when trying to create clipboard.
Primary selection support on Wayland has only recently been
added to the relevant KDE components ([1], [2]), and an empty
Reference would be returned for the qt5/kf5 VCL plugin when
trying to create create a clipboard for primary selection
in a Plasma Wayland session with that functionality not yet being
available.
Regression from commit 05d286e0065ff1c10e75827ac4726b5a74747128
("vcl/clipboard: create instances with uno constructors", 2020-07-07).
[1] https://invent.kde.org/plasma/kwayland-server/-/merge_requests/15
[2] https://invent.kde.org/plasma/kwin/-/merge_requests/27
Change-Id: Ia9016f56b775003b2ffe81a6f3bf44f411ad39a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99871
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index 7e5f36f67f7d..bd89a1404e01 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -193,7 +193,8 @@ vcl_SystemClipboard_get_implementation(
{
SolarMutexGuard aGuard;
auto xClipboard = ImplGetSVData()->mpDefInst->CreateClipboard( args );
- xClipboard->acquire();
+ if (xClipboard.is())
+ xClipboard->acquire();
return xClipboard.get();
}
More information about the Libreoffice-commits
mailing list