diff options
author | David Robillard <d@drobilla.net> | 2008-11-08 19:09:54 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-11-08 19:09:54 +0000 |
commit | 23bb407a4f0db71eb15cbf8bbb8e82e02088a998 (patch) | |
tree | 6dccf799338b2258da304f2e7d9900de68c90615 /src/serialisation | |
parent | 1c85bf27fcb6e360f7bcdb265f85d9000dcb36ea (diff) | |
download | ingen-23bb407a4f0db71eb15cbf8bbb8e82e02088a998.tar.gz ingen-23bb407a4f0db71eb15cbf8bbb8e82e02088a998.tar.bz2 ingen-23bb407a4f0db71eb15cbf8bbb8e82e02088a998.zip |
Don't die if serialisation returns a NULL string.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1703 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r-- | src/serialisation/Serialiser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index 96fe2632..cb9e36e4 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -150,8 +150,10 @@ Serialiser::finish() _model->serialise_to_file(_base_uri); } else { char* c_str = _model->serialise_to_string(); - ret = c_str; - free(c_str); + if (c_str != NULL) { + ret = c_str; + free(c_str); + } } _base_uri = ""; |