mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Merge branch 'patch-nullpointer-traxmanager' into 'dev'
fixed nullpointer in traxmanager See merge request morningstar/Arcturus-Community!108
This commit is contained in:
commit
6719dad13a
@ -44,7 +44,7 @@ public class TraxManager implements Disposable {
|
|||||||
try (ResultSet set = statement.executeQuery()) {
|
try (ResultSet set = statement.executeQuery()) {
|
||||||
while (set.next()) {
|
while (set.next()) {
|
||||||
HabboItem musicDisc = Emulator.getGameEnvironment().getItemManager().loadHabboItem(set.getInt("item_id"));
|
HabboItem musicDisc = Emulator.getGameEnvironment().getItemManager().loadHabboItem(set.getInt("item_id"));
|
||||||
|
if(musicDisc != null) {
|
||||||
if (!(musicDisc instanceof InteractionMusicDisc) || musicDisc.getRoomId() != -1) {
|
if (!(musicDisc instanceof InteractionMusicDisc) || musicDisc.getRoomId() != -1) {
|
||||||
try (PreparedStatement stmt = connection.prepareStatement("DELETE FROM room_trax_playlist WHERE room_id = ? AND item_id = ? LIMIT 1")) {
|
try (PreparedStatement stmt = connection.prepareStatement("DELETE FROM room_trax_playlist WHERE room_id = ? AND item_id = ? LIMIT 1")) {
|
||||||
stmt.setInt(1, this.room.getId());
|
stmt.setInt(1, this.room.getId());
|
||||||
@ -63,6 +63,8 @@ public class TraxManager implements Disposable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
Emulator.getLogging().logSQLException(e);
|
Emulator.getLogging().logSQLException(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user