Code cleanup
Bugfix: Fix segmentation fault when calling piano roll editor with empty
pattern