open2jamorg/open2jam — pull request #30 by dtinth (2012-11-20 04:32:51+00:00)
Title: Fix various crashes in game...

* Sometimes when changing directory, the music selection GUI crashes. This patch hack prevents it.

Here is the original error message that occured:

~~~
Exception in thread "AWT-EventQueue-0"
java.lang.IndexOutOfBoundsException: Invalid index
at
javax.swing.DefaultRowSorter.convertRowIndexToView(DefaultRowSorter.java
:482)
at javax.swing.JTable.convertRowIndexToView(JTable.java:2589)
at
org.open2jam.gui.parts.MusicSelection.valueChanged(MusicSelection.java:1
484)
at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelect
ionModel.java:167)
~~~

* Pressing the shift key (scratch) crashes the game. This patch also fixes it.