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()
180180 if ( _formState == FormState . NotATemplate || _formState == FormState . Finished )
181181 return ;
182182
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+
184188 _formState = FormState . Finished ;
185189 Gfx . Dispose ( ) ;
186190 Gfx = null ;
@@ -189,7 +193,6 @@ internal virtual void Finish()
189193 {
190194 //pdfForm.CreateStream(PdfEncoders.RawEncoding.GetBytes(PdfRenderer.GetContent()));
191195 PdfRenderer . Close ( ) ;
192- Debug . Assert ( PdfRenderer == null ) ;
193196
194197 if ( _document . Options . CompressContentStreams )
195198 {
You can’t perform that action at this time.
0 commit comments