[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 27 22:29:52 UTC 2018
vcl/unx/generic/printer/cpdmgr.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 773e4896521ccf29ab040f977a3faaadd805c8d8
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Sun Dec 23 00:59:55 2018 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Thu Dec 27 23:29:30 2018 +0100
tdf#122116 Only create CPDManager if D-Bus descriptions present
Since the XML files are required in the
'onNameAcquired()' method, check for their existence
before returning a CPDManager pointer in
'tryLoadCPD()', to avoid returning a CPDManager
that is unusable (and will even lead to a crash).
Change-Id: I83c493ba8bd775ea398111971cbecb9352050194
Reviewed-on: https://gerrit.libreoffice.org/65576
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 87d90b6e60659e9c976daa9692ae99ec87a6978c)
Reviewed-on: https://gerrit.libreoffice.org/65634
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index aedcd5b42543..c9908ae27204 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -250,6 +250,12 @@ CPDManager* CPDManager::tryLoadCPD()
static const char* pEnv = getenv("SAL_DISABLE_CPD");
if (!pEnv || !*pEnv) {
+ // interface description XML files are needed in 'onNameAcquired()'
+ if (!g_file_test(FRONTEND_INTERFACE, G_FILE_TEST_IS_REGULAR) ||
+ !g_file_test(BACKEND_INTERFACE, G_FILE_TEST_IS_REGULAR)) {
+ return nullptr;
+ }
+
GDir *dir;
const gchar *filename;
dir = g_dir_open(BACKEND_DIR, 0, nullptr);
More information about the Libreoffice-commits
mailing list