FileBrowserView
FileBrowserView copied to clipboard
fix bug for null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.psaravan.filebrowserview.demo/com.psaravan.filebrowserview.demo.ListActivity.ListActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.HashMap com.psaravan.filebrowserview.lib.FileBrowserEngine.FileExtensionFilter.getFilterMap()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2460) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2522) at android.app.ActivityThread.access$800(ActivityThread.java:167) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:179) at android.app.ActivityThread.main(ActivityThread.java:5543) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.HashMap com.psaravan.filebrowserview.lib.FileBrowserEngine.FileExtensionFilter.getFilterMap()' on a null object reference at com.psaravan.filebrowserview.lib.FileBrowserEngine.FileBrowserEngine.loadDir(FileBrowserEngine.java:135) at com.psaravan.filebrowserview.lib.ListLayout.ListLayoutView.showDir(ListLayoutView.java:82) at com.psaravan.filebrowserview.lib.ListLayout.ListLayoutView.init(ListLayoutView.java:65) at com.psaravan.filebrowserview.lib.View.FileBrowserView.init(FileBrowserView.java:134) at com.psaravan.filebrowserview.demo.ListActivity.ListActivity.onCreate(ListActivity.java:58) at android.app.Activity.performCreate(Activity.java:5975) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2522) at android.app.ActivityThread.access$800(ActivityThread.java:167) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:179) at android.app.ActivityThread.main(ActivityThread.java:5543) at java.lang.reflect.Method.invoke(Native Method)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.psaravan.filebrowserview.demo/com.psaravan.filebrowserview.demo.ListActivity.ListActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.HashMap com.psaravan.filebrowserview.lib.FileBrowserEngine.FileExtensionFilter.getFilterMap()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2460) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2522) at android.app.ActivityThread.access$800(ActivityThread.java:167) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:179) at android.app.ActivityThread.main(ActivityThread.java:5543) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.HashMap com.psaravan.filebrowserview.lib.FileBrowserEngine.FileExtensionFilter.getFilterMap()' on a null object reference at com.psaravan.filebrowserview.lib.FileBrowserEngine.FileBrowserEngine.loadDir(FileBrowserEngine.java:135) at com.psaravan.filebrowserview.lib.ListLayout.ListLayoutView.showDir(ListLayoutView.java:82) at com.psaravan.filebrowserview.lib.ListLayout.ListLayoutView.init(ListLayoutView.java:65) at com.psaravan.filebrowserview.lib.View.FileBrowserView.init(FileBrowserView.java:134) at com.psaravan.filebrowserview.demo.ListActivity.ListActivity.onCreate(ListActivity.java:58) at android.app.Activity.performCreate(Activity.java:5975) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2522) at android.app.ActivityThread.access$800(ActivityThread.java:167) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:179) at android.app.ActivityThread.main(ActivityThread.java:5543) at java.lang.reflect.Method.invoke(Native Method)