Skip to content

Commit 7bdf111

Browse files
IsakNaslundBhFraser Greenroyd
authored andcommitted
Check that the doc is not null
1 parent f162b64 commit 7bdf111

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Rhinoceros_Engine/Compute/CaptureNamedViews.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public static bool CaptureNamedViews(bool active = false, string folderPath = ""
5252
{
5353
RhinoDoc doc = RhinoDoc.ActiveDoc;
5454

55+
if (doc == null)
56+
return false;
57+
5558
folderPath = ValidateFolderPath(folderPath, doc);
5659
if (folderPath == null)
5760
return false;

Rhinoceros_Engine/Compute/CaptureView.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public static bool CaptureView(bool active = false, string folderPath = "", stri
5151
{
5252
RhinoDoc doc = Rhino.RhinoDoc.ActiveDoc;
5353

54+
if (doc == null)
55+
return false;
56+
5457
folderPath = ValidateFolderPath(folderPath, doc);
5558
if (folderPath == null)
5659
return false;

0 commit comments

Comments
 (0)