[evolution-data-server] _libedataserverui_init_icon_theme: Test whether default GdkScreen exists
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] _libedataserverui_init_icon_theme: Test whether default GdkScreen exists
- Date: Wed, 1 Dec 2021 17:41:36 +0000 (UTC)
commit 237eaecb778e041a69641a578ab6e32c4f82a6a8
Author: Milan Crha <mcrha redhat com>
Date: Wed Dec 1 18:35:33 2021 +0100
_libedataserverui_init_icon_theme: Test whether default GdkScreen exists
It does not exist when building developer documentation, which causes
a runtime warning from the gtk+ code, thus test it before calling
gtk_icon_theme_get_default().
src/libedataserverui/libedataserverui-private.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/libedataserverui/libedataserverui-private.c b/src/libedataserverui/libedataserverui-private.c
index e303a87c2..0c6615d91 100644
--- a/src/libedataserverui/libedataserverui-private.c
+++ b/src/libedataserverui/libedataserverui-private.c
@@ -61,7 +61,8 @@ _libedataserverui_init_icon_theme (void)
{
static gboolean icons_added = FALSE;
- if (!icons_added) {
+ /* The screen can be NULL when building the documentation */
+ if (!icons_added && gdk_screen_get_default ()) {
icons_added = TRUE;
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), E_DATA_SERVER_ICONDIR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]