diff --git a/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/db/DatabaseHelper.java b/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/db/DatabaseHelper.java index ce0c8840..8f400797 100644 --- a/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/db/DatabaseHelper.java +++ b/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/db/DatabaseHelper.java @@ -289,9 +289,11 @@ public void handleMessage( final Message msg ) { } final MainActivity mainActivity = MainActivity.getMainActivity(); - final Intent errorReportIntent = new Intent( mainActivity, ErrorReportActivity.class ); - errorReportIntent.putExtra( ERROR_REPORT_DIALOG, error ); - mainActivity.startActivity( errorReportIntent ); + if (null != mainActivity) { + final Intent errorReportIntent = new Intent(mainActivity, ErrorReportActivity.class); + errorReportIntent.putExtra(ERROR_REPORT_DIALOG, error); + mainActivity.startActivity(errorReportIntent); + } } }