summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2012-12-10 19:03:08 +0900
committerAkira TAGOH <akira@tagoh.org>2012-12-10 19:03:08 +0900
commita9bee062439fa6992919d964832415fdd67f8d09 (patch)
tree419fbff067691fb2d7b8ec28babb042876cea88a
parent5793da78b90c819e9b7192877faf4f5f2e085adf (diff)
Don't output an error message even if no data is set in lt_error_t
-rw-r--r--liblangtag/lt-error.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/liblangtag/lt-error.c b/liblangtag/lt-error.c
index f160e23..091ad67 100644
--- a/liblangtag/lt-error.c
+++ b/liblangtag/lt-error.c
@@ -158,7 +158,8 @@ void
lt_error_clear(lt_error_t *error)
{
if (error) {
- lt_mem_delete_ref(&error->parent, error->data);
+ if (error->data)
+ lt_mem_delete_ref(&error->parent, error->data);
error->data = NULL;
}
}