changeset 19644:965384560122

colormap.m: memory lock function to protect persistent variable from clear().
author Carnë Draug <carandraug@octave.org>
date Fri, 23 Jan 2015 13:17:08 +0000
parents b705f88044be
children ed4eeb4314e6
files scripts/image/colormap.m
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/image/colormap.m	Fri Jan 23 13:14:38 2015 +0000
+++ b/scripts/image/colormap.m	Fri Jan 23 13:17:08 2015 +0000
@@ -60,6 +60,7 @@
 ## Adapted-By: jwe
 
 function cmap = colormap (varargin)
+  mlock; # prevent map_list to be cleared by "clear all"
   persistent map_list = cell ();
 
   [hax, varargin, nargin] = __plt_get_axis_arg__ ("colormap", varargin{:});