plug-ins: crash on exporting dds with invalid number of mipmaps
Closes #15226 When you previously exported a dds with the pre-existing mipmaps, that will be the option selected in the export dialog the next time. If, however, that next time there were an incorrect number of mipmaps available, the option was grayed out, but selected. Exporting then caused a crash due to less mipmap layers being available than expected. When writing the dds settings we need to update that setting in our config object, so that's what we add here. Also remove updating the local variable since that will not be used anymore in this function.
This commit is contained in:
parent
96a921f4d5
commit
b962bdbddd
1 changed files with 5 additions and 1 deletions
|
|
@ -519,7 +519,11 @@ write_dds (GFile *file,
|
|||
{
|
||||
if (! is_mipmap_chain_valid &&
|
||||
mipmaps == DDS_MIPMAP_EXISTING)
|
||||
mipmaps = DDS_MIPMAP_NONE;
|
||||
{
|
||||
g_object_set (config,
|
||||
"mipmaps", "none",
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (! save_dialog (image, drawable, procedure, config))
|
||||
return GIMP_PDB_CANCEL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue