git.s-ol.nu inkscape / 6acb593
fix PNG export dialog crash (heap-use-after-free) Possibly related to inbox#1185 Thomas Holder 3 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
451451 {
452452 SPDocument * doc = SP_ACTIVE_DOCUMENT;
453453 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);
455455 Inkscape::Extension::Output * oextension = nullptr;
456456
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()));
459459 }
460460
461461 if (oextension != nullptr) {