aboutsummaryrefslogtreecommitdiff
path: root/qerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'qerror.c')
-rw-r--r--qerror.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/qerror.c b/qerror.c
index 6f9f49c5e3..d073ed7c5a 100644
--- a/qerror.c
+++ b/qerror.c
@@ -493,9 +493,11 @@ static QString *qerror_format_desc(QDict *error,
return qstring;
}
-QString *qerror_format(const char *fmt, QDict *error)
+char *qerror_format(const char *fmt, QDict *error)
{
const QErrorStringTable *entry = NULL;
+ QString *qstr;
+ char *ret;
int i;
for (i = 0; qerror_table[i].error_fmt; i++) {
@@ -505,7 +507,11 @@ QString *qerror_format(const char *fmt, QDict *error)
}
}
- return qerror_format_desc(error, entry);
+ qstr = qerror_format_desc(error, entry);
+ ret = g_strdup(qstring_get_str(qstr));
+ QDECREF(qstr);
+
+ return ret;
}
/**