fix: fixes crashes when currentQuery is null and suicide prevention dialog is enabled

cc: @FineFindus
This commit is contained in:
LucasGGamerM 2023-09-06 11:24:50 -03:00
parent 9836538562
commit 777891ebe9

View file

@ -388,7 +388,7 @@ public class SearchQueryFragment extends MastodonRecyclerFragment<SearchResultVi
} }
private void wrapSuicideDialog(Runnable r){ private void wrapSuicideDialog(Runnable r){
if(!GlobalUserPreferences.showSuicideHelp){ if(!GlobalUserPreferences.showSuicideHelp || currentQuery==null){
r.run(); r.run();
return; return;
} }