title: Using SQLite DB with fragment
body: <p>So I have a basic activity with some tabs fragments. One of them open a connection to my db. The application start without any crash but when I rotate the phone and the view is recreated I get a "NullPointerException" on :</p>
  
  <pre><code>147    MySQLiteHelper dbHelper = new MySQLiteHelper(getActivity());
  148    SQLiteDatabase db = dbHelper.getReadableDatabase();
  </code></pre>
  
  <p>debugger :</p>
  
  <pre><code>09-30 00:12:56.307    9690-9690/com.apps.jean.emergency E/AndroidRuntime﹕ FATAL EXCEPTION: main
  java.lang.NullPointerException
          at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:224)
          at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:188)
          at com.apps.jean.emergency.Fragment.Call_Fragment.loadContinentDataInSpinner(Call_Fragment.java:148)
  </code></pre>
  
  <p>Can anyone help me with this ? Thanks !</p>