B2012-374 – Added logic to handle null references if RO path not assigned and you open the Admin ribbon tab

This commit is contained in:
John Jenko 2013-01-04 15:20:38 +00:00
parent 2a6ff5d0b3
commit c8f7ed41c1

View File

@ -1519,13 +1519,13 @@ namespace Volian.Controls.Library
{
ribbonTab_SingleClick(sender, e);
btnUpdROVal.Enabled = false;
if (MyDVI.DocVersionAssociations.Count < 1) return;
if (MyDVI.DocVersionAssociations == null || MyDVI.DocVersionAssociations.Count < 1) return;
if (!NewerRoFst()) return;
btnUpdROVal.Enabled = true;
}
public bool NewerRoFst()
{
if (_MyDVI == null) return false;
if (_MyDVI == null || _MyDVI.DocVersionAssociations == null) return false;
ROFstInfo roFstInfo = ROFstInfo.GetJustROFst( _MyDVI.DocVersionAssociations[0].ROFstID);
RODbInfo rdi = RODbInfo.GetJustRODB(roFstInfo.RODbID);
string rofstPath = rdi.FolderPath + @"\ro.fst";