Skip to content

Commit

Permalink
Fix null ref check
Browse files Browse the repository at this point in the history
  • Loading branch information
wobba committed Nov 9, 2021
1 parent ab316c5 commit cc00053
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2459,7 +2459,7 @@ private void SetPromotedResultItems(SearchQueryResult searchResult)

var srq = searchResult.SecondaryQueryResults;

if (srq[0].PromotedResults.Count > 0)
if (srq != null && srq[0].PromotedResults.Count > 0)
{
StackPanel spTop = new StackPanel { Orientation = Orientation.Vertical };

Expand Down

0 comments on commit cc00053

Please sign in to comment.