[anjuta/gnome-2-30] libanjuta: #615718 - anjuta-command crash call on set_error_message.
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gnome-2-30] libanjuta: #615718 - anjuta-command crash call on set_error_message.
- Date: Sun, 18 Apr 2010 20:32:33 +0000 (UTC)
commit 9b074164bd6bd653703a41f8b04dfea289d05527
Author: Johannes Schmid <jhs gnome org>
Date: Sun Apr 18 22:08:47 2010 +0200
libanjuta: #615718 - anjuta-command crash call on set_error_message.
libanjuta/anjuta-command.c | 5 ++---
libanjuta/anjuta-command.h | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libanjuta/anjuta-command.c b/libanjuta/anjuta-command.c
index 2bd71e4..8ac354a 100644
--- a/libanjuta/anjuta-command.c
+++ b/libanjuta/anjuta-command.c
@@ -240,10 +240,9 @@ anjuta_command_notify_progress (AnjutaCommand *self, gfloat progress)
* of failure.
*/
void
-anjuta_command_set_error_message (AnjutaCommand *self, gchar *error_message)
+anjuta_command_set_error_message (AnjutaCommand *self, const gchar *error_message)
{
- if (self->priv->error_message)
- g_free (error_message);
+ g_free (self->priv->error_message);
self->priv->error_message = g_strdup (error_message);
}
diff --git a/libanjuta/anjuta-command.h b/libanjuta/anjuta-command.h
index f84b8c0..5fdcd63 100644
--- a/libanjuta/anjuta-command.h
+++ b/libanjuta/anjuta-command.h
@@ -51,7 +51,7 @@ struct _AnjutaCommandClass
void (*notify_data_arrived) (AnjutaCommand *self);
void (*notify_complete) (AnjutaCommand *self, guint return_code);
void (*notify_progress) (AnjutaCommand *self, gfloat progress);
- void (*set_error_message) (AnjutaCommand *self, gchar *error_message);
+ void (*set_error_message) (AnjutaCommand *self, const gchar *error_message);
gchar * (*get_error_message) (AnjutaCommand *self);
/* Signals */
@@ -74,7 +74,7 @@ void anjuta_command_notify_data_arrived (AnjutaCommand *self);
void anjuta_command_notify_complete (AnjutaCommand *self, guint return_code);
void anjuta_command_notify_progress (AnjutaCommand *self, gfloat progress);
-void anjuta_command_set_error_message (AnjutaCommand *self, gchar *error_message);
+void anjuta_command_set_error_message (AnjutaCommand *self, const gchar *error_message);
gchar *anjuta_command_get_error_message (AnjutaCommand *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]