[gnome-control-center] wacom: Fix crasher using link to display panel
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: Fix crasher using link to display panel
- Date: Fri, 25 May 2012 11:16:56 +0000 (UTC)
commit 5a2b4112553f2b910c559a7624c16adfaa9d6d3d
Author: Bastien Nocera <hadess hadess net>
Date: Fri May 25 12:14:27 2012 +0100
wacom: Fix crasher using link to display panel
->panel was never set within the page object.
panels/wacom/cc-wacom-page.c | 2 ++
panels/wacom/cc-wacom-panel.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-page.c b/panels/wacom/cc-wacom-page.c
index a0cff9a..f3840ef 100644
--- a/panels/wacom/cc-wacom-page.c
+++ b/panels/wacom/cc-wacom-page.c
@@ -849,6 +849,7 @@ cc_wacom_page_dispose (GObject *object)
priv->builder = NULL;
}
+ priv->panel = NULL;
G_OBJECT_CLASS (cc_wacom_page_parent_class)->dispose (object);
}
@@ -1129,6 +1130,7 @@ cc_wacom_page_new (CcWacomPanel *panel,
page = g_object_new (CC_TYPE_WACOM_PAGE, NULL);
priv = page->priv;
+ priv->panel = panel;
cc_wacom_page_update_tools (page, stylus, eraser, pad);
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index 087d1b6..10b0df6 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -294,6 +294,8 @@ cc_wacom_panel_switch_to_panel (CcWacomPanel *self,
CcShell *shell;
GError *error = NULL;
+ g_return_if_fail (self);
+
shell = cc_panel_get_shell (CC_PANEL (self));
if (cc_shell_set_active_panel_from_id (shell, panel, NULL, &error) == FALSE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]