changeset 304:499653b553b8 feature/beams

copyWithDefault: fixed bug.
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 12 Sep 2016 14:08:06 +0200
parents e1a05acc1b5d
children dfa4455033db
files copyWithDefault.m
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
diff -r e1a05acc1b5d -r 499653b553b8 copyWithDefault.m
--- a/copyWithDefault.m	Fri Sep 09 13:11:25 2016 +0200
+++ b/copyWithDefault.m	Mon Sep 12 14:08:06 2016 +0200
@@ -8,7 +8,8 @@
     end
 
     % src has a value and is not a struct => use src
-    if ~isstruct(src)
+    % src has a value and default is not a struct => use src
+    if ~isstruct(src) || ~isstruct(default)
         dest = src;
         return
     end