[gnome-control-center] info: Fix crash when opening Overview panel
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] info: Fix crash when opening Overview panel
- Date: Thu, 18 Jan 2018 00:14:49 +0000 (UTC)
commit 35e670c6dab4d263b4adcafb48ed423424c88f8a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Jan 17 22:13:27 2018 -0200
info: Fix crash when opening Overview panel
The GType of CcHostnameEntry might not be registered
by the time the Overview panel is initialized, which
leads to crash.
Fix that by ensuring the CcHostnameEntry type early in
class_init.
panels/info/cc-info-overview-panel.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index 5c54f62..49727a5 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -21,6 +21,8 @@
#include <config.h>
+#include "shell/cc-hostname-entry.h"
+
#include "cc-info-resources.h"
#include "info-cleanup.h"
@@ -929,6 +931,8 @@ cc_info_overview_panel_class_init (CcInfoOverviewPanelClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, label8);
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, grid1);
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, label18);
+
+ g_type_ensure (CC_TYPE_HOSTNAME_ENTRY);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]