B2022-038: Don’t crash on table restore

This commit is contained in:
Kathy Ruffing 2022-03-11 15:58:33 +00:00
parent 88bdc706f4
commit 3739033311

View File

@ -313,7 +313,9 @@ namespace Volian.Controls.Library
GridAuditInfoList gail = GridAuditInfoList.Get(cai.ContentID);
foreach (GridAuditInfo gai in gail)
{
if (gai.DeleteStatus == 0)
// B2022-038: Fix crash on restore of grid. If it doesn't have a ContentAuditID don't add to list (was causing a Null access
// when restoring the change)
if (gai.DeleteStatus == 0 && gai.ContentAuditID != 0)
{
if (contentHistory == null)
contentHistory = tvAudits.Nodes.Add("Content Changes"); //contentHistory = tvAudits.Nodes.Add("Content History");