From a673c49db80fc6218d1268d49b3bb50ea882393a Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 28 Feb 2014 12:26:29 -0500 Subject: [PATCH] cheap fix to br_get_filename --- openbr/openbr.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openbr/openbr.cpp b/openbr/openbr.cpp index 84356fa..5582f8d 100644 --- a/openbr/openbr.cpp +++ b/openbr/openbr.cpp @@ -382,10 +382,9 @@ bool br_img_is_empty(br_template tmpl) const char* br_get_filename(br_template tmpl) { - Template *t = reinterpret_cast(tmpl); - QByteArray s = t->file.name.toLocal8Bit(); - char *buffer = s.data(); - return buffer; + static QByteArray buffer; + buffer = reinterpret_cast(tmpl)->file.name.toLocal8Bit(); + return buffer.data(); } void br_set_filename(br_template tmpl, const char *filename) -- libgit2 0.21.4