[Libreoffice-commits] core.git: vcl/unx
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 13 14:51:51 UTC 2021
vcl/unx/gtk3/gtk3gtkinst.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit e027a91010a4517cfa907f3d80c9188f026b3823
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Tue Jan 12 21:22:51 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 13 15:51:09 2021 +0100
Check gtk_builder_add_from_file result and log if needed (vcl/gtk3)
Change-Id: Ic9af6a59a8ffb7fa835026dc44c8431ec412f44a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109200
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index b36d7d713e86..39c826823d01 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -16777,9 +16777,14 @@ public:
osl::FileBase::getSystemPathFromFileURL(aUri, aPath);
m_pBuilder = gtk_builder_new();
m_nNotifySignalId = g_signal_connect_data(G_OBJECT(m_pBuilder), "notify", G_CALLBACK(signalNotify), this, nullptr, G_CONNECT_AFTER);
- auto rc = gtk_builder_add_from_file(m_pBuilder, OUStringToOString(aPath, RTL_TEXTENCODING_UTF8).getStr(), nullptr);
+ GError *err = nullptr;
+ auto rc = gtk_builder_add_from_file(m_pBuilder, OUStringToOString(aPath, RTL_TEXTENCODING_UTF8).getStr(), &err);
+ if (!rc)
+ {
+ SAL_WARN( "vcl.gtk", "GtkInstanceBuilder: error when calling gtk_builder_add_from_file: " << err->message);
+ g_error_free(err);
+ }
assert(rc && "could not load UI file");
- (void) rc;
m_pObjectList = gtk_builder_get_objects(m_pBuilder);
g_slist_foreach(m_pObjectList, postprocess, this);
More information about the Libreoffice-commits
mailing list