[easytag] Check for an error when creating a temporary file
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Check for an error when creating a temporary file
- Date: Tue, 30 Jun 2015 07:33:25 +0000 (UTC)
commit b9224a1d8775a8f5ebefb5b60a25270050909c6b
Author: David King <amigadave amigadave com>
Date: Mon Jun 29 19:01:31 2015 +0100
Check for an error when creating a temporary file
Remove a FIXME in the TagLib GIO wrapper.
src/tags/gio_wrapper.cc | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/tags/gio_wrapper.cc b/src/tags/gio_wrapper.cc
index 234e217..8716331 100644
--- a/src/tags/gio_wrapper.cc
+++ b/src/tags/gio_wrapper.cc
@@ -262,8 +262,13 @@ GIO_IOStream::insert (TagLib::ByteVector const &data,
}
GFileIOStream *tstr;
- /* FIXME: Check for NULL. */
- GFile *tmp = g_file_new_tmp ("easytag-XXXXXX", &tstr, NULL);
+ GFile *tmp = g_file_new_tmp ("easytag-XXXXXX", &tstr, &error);
+
+ if (tmp == NULL)
+ {
+ return;
+ }
+
char buffer[4096];
gsize r;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]