Bug 733824 - PDF export fails without warning if open in other application.

This happens on the Windows platforms in particular where applications
can lock files, preventing GIMP to obtain a file descriptor for writing.
This commit is contained in:
Jehan 2014-07-28 19:28:13 +00:00
parent 035c6717e7
commit eaa4bf2270
1 changed files with 5 additions and 0 deletions

View File

@ -418,6 +418,11 @@ run (const gchar *name,
}
fp = g_fopen (file_name, "wb");
if (fp == NULL)
{
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
return;
}
pdf_file = cairo_pdf_surface_create_for_stream (write_func, fp, 1, 1);