aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-03-21 17:47:32 -0700
committerScott Jackson <daneren2005@gmail.com>2016-03-21 17:47:32 -0700
commit13968b5f4424eb3218bee2eef698b91cc99d2976 (patch)
treee268be807e06097569f29a3a7b62cfb17e4e1b41 /app/src/main/java/github/daneren2005
parentd8ffc1970920bb20467bedfc968acbc76486a18e (diff)
downloaddsub-13968b5f4424eb3218bee2eef698b91cc99d2976.tar.gz
dsub-13968b5f4424eb3218bee2eef698b91cc99d2976.tar.bz2
dsub-13968b5f4424eb3218bee2eef698b91cc99d2976.zip
Fix error if getLastPlayed is passed null Pair
Diffstat (limited to 'app/src/main/java/github/daneren2005')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java b/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
index f6a1714c..1309ee69 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
@@ -162,7 +162,11 @@ public class SongDBHandler extends SQLiteOpenHelper {
return getLastPlayed(getOnlineSongId(entry));
}
protected synchronized Long[] getLastPlayed(Pair<Integer, String> pair) {
- return getLastPlayed(pair.getFirst(), pair.getSecond());
+ if(pair == null) {
+ return null;
+ } else {
+ return getLastPlayed(pair.getFirst(), pair.getSecond());
+ }
}
public synchronized Long[] getLastPlayed(int serverKey, String id) {
SQLiteDatabase db = this.getReadableDatabase();