B2023-049: Null reference crash on Paste Before
This commit is contained in:
@@ -597,6 +597,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
public static bool CheckSourceDestinationType(int copyStartID, ItemInfo itemInfo)
|
public static bool CheckSourceDestinationType(int copyStartID, ItemInfo itemInfo)
|
||||||
{
|
{
|
||||||
ItemInfo cpyItem = ItemInfo.Get(copyStartID);
|
ItemInfo cpyItem = ItemInfo.Get(copyStartID);
|
||||||
|
|
||||||
|
// B2023-049: crash when copied step is no longer available (may have been deleted in previous operation)
|
||||||
|
if (cpyItem == null)
|
||||||
|
{
|
||||||
|
DialogResult msgBoxResult = FlexibleMessageBox.Show("The step you are pasting no longer exists - it may have been deleted as part of a previous operation.", "Paste Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// B2017-065 use MyContent instead of _Mycontent so that if null it will get the needed content
|
// B2017-065 use MyContent instead of _Mycontent so that if null it will get the needed content
|
||||||
int? SourceType = cpyItem.MyContent.Type;
|
int? SourceType = cpyItem.MyContent.Type;
|
||||||
int? DestType = itemInfo.MyContent.Type;
|
int? DestType = itemInfo.MyContent.Type;
|
||||||
|
Reference in New Issue
Block a user