]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-def.cc
release: 1.1.1
[lilypond.git] / lily / text-def.cc
index 3597f30e5e93219cfa46b49c611168bb8a96d5ac..06eccd3fe6d120ede73d8110c88cf864b71ba329 100644 (file)
@@ -65,8 +65,8 @@ Text_def::Text_def()
 bool
 Text_def::do_equal_b (General_script_def const *gdef) const
 {
-  Text_def const *def= (Text_def*)gdef;
-  return align_dir_ == def->align_dir_ && text_str_ == def->text_str_
+  Text_def const *def= dynamic_cast<Text_def const*>(gdef);
+  return def&& align_dir_ == def->align_dir_ && text_str_ == def->text_str_
        && style_str_ == def->style_str_;
 }