[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Mar 21 19:47:41 UTC 2021
vcl/unx/generic/printer/cpdmgr.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 944c27cf195dcf928687f0a5b392c714b79ad444
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Mar 21 14:58:50 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 21 20:46:56 2021 +0100
cid#1473820 Unchecked return value from library
Change-Id: I61721dcfa1b38e224cccceb5e7cad0c2cd58f73b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112845
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index 0789ae7e1ca7..4f375b9cc416 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -259,9 +259,11 @@ CPDManager* CPDManager::tryLoadCPD()
gchar* contents;
std::stringstream filepath;
filepath << BACKEND_DIR << '/' << filename;
- g_file_get_contents(filepath.str().c_str(), &contents, nullptr, nullptr);
- std::pair<std::string, gchar*> new_tbackend (filename, contents);
- pManager->addTempBackend(new_tbackend);
+ if (g_file_get_contents(filepath.str().c_str(), &contents, nullptr, nullptr))
+ {
+ std::pair<std::string, gchar*> new_tbackend (filename, contents);
+ pManager->addTempBackend(new_tbackend);
+ }
}
g_dir_close(dir);
}
More information about the Libreoffice-commits
mailing list