fix PNG export dialog crash (heap-use-after-free)
Possibly related to inbox#1185
Thomas Holder
3 years ago
451 | 451 | { |
452 | 452 | SPDocument * doc = SP_ACTIVE_DOCUMENT; |
453 | 453 | const gchar *uri = doc->getDocumentURI(); |
454 | const gchar *text_extension = get_file_save_extension (Inkscape::Extension::FILE_SAVE_METHOD_SAVE_AS).c_str(); | |
454 | auto &&text_extension = get_file_save_extension(Inkscape::Extension::FILE_SAVE_METHOD_SAVE_AS); | |
455 | 455 | Inkscape::Extension::Output * oextension = nullptr; |
456 | 456 | |
457 | if (text_extension != nullptr) { | |
458 | oextension = dynamic_cast<Inkscape::Extension::Output *>(Inkscape::Extension::db.get(text_extension)); | |
457 | if (!text_extension.empty()) { | |
458 | oextension = dynamic_cast<Inkscape::Extension::Output *>(Inkscape::Extension::db.get(text_extension.c_str())); | |
459 | 459 | } |
460 | 460 | |
461 | 461 | if (oextension != nullptr) { |