Mercurial > octave-dspies
changeset 18383:abc78c10acb6 stable
graphics_toolkit: Check argument against list of available toolkits (bug #41258)
* graphics_toolkit.m: Check argument against list of available toolkits, better
error reporting in case of typo or missing toolkit.
author | Michael Godfrey <michaeldgodfrey@gmail.com> |
---|---|
date | Thu, 16 Jan 2014 22:49:52 -0500 |
parents | 97984c1c41f0 |
children | bd9d34f28b0f |
files | scripts/plot/util/graphics_toolkit.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/graphics_toolkit.m Fri Jan 24 14:40:23 2014 -0800 +++ b/scripts/plot/util/graphics_toolkit.m Thu Jan 16 22:49:52 2014 -0500 @@ -66,6 +66,10 @@ endif endif + if (! any (strcmp (available_graphics_toolkits (), name))) + error ("graphics_toolkit: %s toolkit is not available", name); + endif + if (! any (strcmp (loaded_graphics_toolkits (), name))) feval (["__init_", name, "__"]); if (! any (strcmp (loaded_graphics_toolkits (), name)))