Pointers must stay valid till after the png_write_info call. Thanks wjp
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3773
This commit is contained in:
parent
b30d51f8f8
commit
353ced54c2
1 changed files with 3 additions and 1 deletions
|
@ -371,9 +371,11 @@ void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags,
|
|||
text[0].key = software;
|
||||
text[0].text = ptext_s;
|
||||
png_set_text(png_ptr, info_ptr, text, fields);
|
||||
delete [] ptext_s;
|
||||
#endif
|
||||
png_write_info(png_ptr, info_ptr);
|
||||
#ifdef PNG_TEXT_SUPPORTED
|
||||
delete [] ptext_s;
|
||||
#endif
|
||||
for (i=0;i<height;i++) {
|
||||
void *rowPointer;
|
||||
void *srcLine;
|
||||
|
|
Loading…
Add table
Reference in a new issue