From 810b673f999cc011ca19ca2ed3dc3aaeb6f4de6f Mon Sep 17 00:00:00 2001 From: Andy Carra Date: Sat, 9 Mar 2024 13:48:39 -0800 Subject: [PATCH] didn't know that was a risk here. (from play store report) --- .../java/net/wigle/wigleandroid/db/DatabaseHelper.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); + } } }