]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/request-iterator.cc
release: 1.1.1
[lilypond.git] / lily / request-iterator.cc
index 56764298f5900e2552044c9715af355e00002c65..5ed0f311556015b890cc3724c78e0184263a5a08 100644 (file)
@@ -65,11 +65,14 @@ Request_chord_iterator::do_process_and_next (Moment mom)
     {
       for (PCursor<Music*> i (elt_l ()->music_p_list_p_->top ()); i.ok(); i++)
        {
-         assert (i->is_type_b (Request::static_name()));
-         Request * req_l = (Request*)i.ptr();
-         bool gotcha = report_to_l()->try_request (req_l);
-         if (!gotcha)
-           req_l->warning (_f ("junking request: `%s\'", req_l->name()));
+         if (Request * req_l = dynamic_cast<Request*> (i.ptr()))
+           {
+             bool gotcha = report_to_l()->try_request (req_l);
+             if (!gotcha)
+               req_l->warning (_f ("junking request: `%s\'", req_l->name()));
+           }
+         else
+           i.ptr ()->warning (_f ("Huh? Not a Request: `%s\'", i.ptr()->name ()));
        }
       first_b_ = false;
     }