Blob Blame History Raw
--- gnome-power-manager-2.20.0.orig/src/gpm-manager.c	2007-10-05 13:52:51.000000000 -0400
+++ gnome-power-manager-2.20.0/src/gpm-manager.c	2007-10-05 13:51:43.000000000 -0400
@@ -304,6 +304,7 @@
 gpm_manager_action_suspend (GpmManager *manager, const gchar *reason)
 {
 	gboolean allowed;
+	GError *error = NULL;
 
 	if (gpm_control_is_policy_timout_valid (manager->priv->control) == FALSE) {
 		/* error msg timeout not valid */
@@ -344,7 +345,10 @@
 
 	gpm_info_explain_reason (manager->priv->info, GPM_EVENT_SUSPEND,
 				_("Suspending computer"), reason);
-	gpm_control_suspend (manager->priv->control, NULL);
+	gpm_control_suspend (manager->priv->control, &error);
+	if (error != NULL) {
+		g_error_free (error);
+	}
 	return TRUE;
 }
 
@@ -355,6 +359,7 @@
 gpm_manager_action_hibernate (GpmManager *manager, const gchar *reason)
 {
 	gboolean allowed;
+	GError *error = NULL;
 
 	if (gpm_control_is_policy_timout_valid (manager->priv->control) == FALSE) {
 		/* error msg timeout not valid */
@@ -395,7 +400,10 @@
 
 	gpm_info_explain_reason (manager->priv->info, GPM_EVENT_SUSPEND,
 				_("Hibernating computer"), reason);
-	gpm_control_hibernate (manager->priv->control, NULL);
+	gpm_control_hibernate (manager->priv->control, &error);
+	if (error != NULL) {
+		g_error_free (error);
+	}
 	return TRUE;
 }