# HG changeset patch # User John W. Eaton # Date 1317260799 14400 # Node ID f9aec0bcf8260b7dc3be121e05eed34736997ef7 # Parent 105c72254967107e7252b9fe23c56d0825594862 getappdata: return empty matrix for nonexistent property names * getappdata.m: Always initialize missing fields to [], not just when getting the __appdata__ property fails. diff --git a/scripts/miscellaneous/getappdata.m b/scripts/miscellaneous/getappdata.m --- a/scripts/miscellaneous/getappdata.m +++ b/scripts/miscellaneous/getappdata.m @@ -36,9 +36,10 @@ for nh = 1:numel(h) try appdata = get (h(nh), "__appdata__"); - catch + end_try_catch + if (! isfield (appdata, name)) appdata.(name) = []; - end_try_catch + endif val(nh) = {appdata.(name)}; endfor if (nh == 1)