]> iEval git - unical.git/commitdiff
Fix previous commit
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 13 Aug 2013 09:30:39 +0000 (12:30 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 13 Aug 2013 09:30:39 +0000 (12:30 +0300)
src/ro/ieval/unical/Application.java

index 265de0de64074adfa21cc57d1df13b7c302bc96c..09f8707b466a5d2a8c3d8c89c91cc3dd02b0e0e0 100644 (file)
@@ -9,10 +9,11 @@ public final class Application extends android.app.Application {
        public void onCreate(){
                alarmOpenHelper = new AlarmOpenHelper(this);
                final Cursor cur = alarmOpenHelper.getReadableDatabase().query(AlarmOpenHelper.TABLE, null, null, null, null, null, null);
-               cur.moveToFirst();
-               do {
-                       Utils.setAlarm(this, cur.getLong(0), cur.getLong(1));
-                       cur.moveToNext();
-               } while(!cur.isAfterLast());
+               if(cur.moveToFirst()) {
+                       do {
+                               Utils.setAlarm(this, cur.getLong(0), cur.getLong(1));
+                               cur.moveToNext();
+                       } while(!cur.isAfterLast());
+               }
        }
 }
This page took 0.026905 seconds and 4 git commands to generate.