--- psiconv/trunk/lib/psiconv/generate_texted.c 2004/02/25 20:57:10 231 +++ psiconv/trunk/lib/psiconv/generate_texted.c 2014/10/22 19:53:40 351 @@ -1,6 +1,6 @@ /* generate_texted.c - Part of psiconv, a PSION 5 file formats converter - Copyright (c) 2000-2004 Frodo Looijaard + Copyright (c) 2000-2014 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,12 +50,16 @@ } if (!(*extra_buf = psiconv_buffer_new())) { + psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } layout_id = psiconv_buffer_unique_id(); - psiconv_buffer_add_target(*extra_buf,layout_id); + if ((res = psiconv_buffer_add_target(*extra_buf,layout_id))) { + psiconv_error(config,lev+1,0,"Out of memory error"); + goto ERROR2; + } if (psiconv_list_length(value->paragraphs)) { with_layout_section = 1;