changeset 19355:a2595c4b8efe

Make dellistener work again with 3 arguments (bug #43580) * graphics.cc (Fdellistener): test the third argument is a string before trying to convert it.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 11 Nov 2014 20:42:34 +0100
parents 50922b1c74df
children 68db8396c378
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Mon Nov 10 23:11:20 2014 +0000
+++ b/libinterp/corefcn/graphics.cc	Tue Nov 11 20:42:34 2014 +0100
@@ -11064,8 +11064,8 @@
                                                  POSTSET);
                   else
                     {
-                      caseless_str persistent = args(2).string_value ();
-                      if (persistent.compare ("persistent"))
+                      if (args(2).is_string () &&
+                          args(2).string_value () == "persistent")
                         {
                           go.delete_property_listener (pname, octave_value (),
                                                        PERSISTENT);