File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,11 @@ internal virtual void Finish()
180
180
if ( _formState == FormState . NotATemplate || _formState == FormState . Finished )
181
181
return ;
182
182
183
- Debug . Assert ( _formState == FormState . Created || _formState == FormState . UnderConstruction ) ;
183
+ if ( ! ( _formState == FormState . Created || _formState == FormState . UnderConstruction ) )
184
+ {
185
+ throw new InvalidOperationException ( "Expected the form to be Created or UnderConstruction" ) ;
186
+ }
187
+
184
188
_formState = FormState . Finished ;
185
189
Gfx . Dispose ( ) ;
186
190
Gfx = null ;
@@ -189,7 +193,6 @@ internal virtual void Finish()
189
193
{
190
194
//pdfForm.CreateStream(PdfEncoders.RawEncoding.GetBytes(PdfRenderer.GetContent()));
191
195
PdfRenderer . Close ( ) ;
192
- Debug . Assert ( PdfRenderer == null ) ;
193
196
194
197
if ( _document . Options . CompressContentStreams )
195
198
{
You can’t perform that action at this time.
0 commit comments