Merge pull request #266 from piegamesde/master

Fix two GUI bugs with uncaught exceptions
presentation
andreasb242 7 years ago committed by GitHub
commit b700ed962b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/control/RecentManager.cpp
  2. 2
      src/gui/dialog/ExportDialog.cpp

@ -180,7 +180,11 @@ GList* RecentManager::filterRecent(GList* items, bool xoj)
if (!ba::starts_with(uri, "file://")) continue;
using namespace boost::filesystem;
if (!exists(path(uri.substr(7)))) continue; //substr is for removing uri's file://
try {
if (!exists(path(uri.substr(7)))) continue; //substr is for removing uri's file://
} catch (boost::filesystem::filesystem_error) {
continue;
}
if (xoj && ba::ends_with(uri, ".xoj"))
{

@ -386,7 +386,7 @@ bool ExportDialog::fileTypeByExtension()
gtk_tree_model_get(GTK_TREE_MODEL(this->typesModel), &iter, COL_EXTENSION, &currentExtension, -1);
if (extension == currentExtension)
if (currentExtension && extension == currentExtension)
{
gtk_tree_model_get(GTK_TREE_MODEL(this->typesModel), &iter, COL_TYPE, &this->type, -1);

Loading…
Cancel
Save