Mercurial > forge
changeset 11318:ff63b8775d62 octave-forge
Fix xlsclose call in unwind_protect block
author | prnienhuis |
---|---|
date | Sun, 23 Dec 2012 12:45:14 +0000 |
parents | b46321fc2836 |
children | 1f1a284a6eb9 |
files | main/io/inst/xlswrite.m |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/xlswrite.m Sat Dec 22 16:16:06 2012 +0000 +++ b/main/io/inst/xlswrite.m Sun Dec 23 12:45:14 2012 +0000 @@ -108,6 +108,7 @@ ## 2012-01-26 Fixed "seealso" help string ## 2012-06-07 Replaced all tabs by double space ## 2012-10-24 Style fixes +## 2012-12-23 Fix rare occasion of xlsclose error in unwind_protect block function [ rstatus ] = xlswrite (filename, arr, arg3, arg4, arg5) @@ -172,7 +173,7 @@ [xls, rstatus] = oct2xls (arr(1:nr, 1:nc), xls, wsh, topleft); unwind_protect_cleanup - if (xls_ok) + if (xls_ok && ! isempty (xls)) xls = xlsclose (xls); endif