diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index b68a09d77f..00c304ac30 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -99,7 +99,8 @@ TempName::~TempName() TempName & TempName::operator=(TempName const & other) { if (this != &other) { - tempname_.removeFile(); + if (!tempname_.empty()) + tempname_.removeFile(); support::TempFile f("lyxextXXXXXX.tmp"); f.setAutoRemove(false); tempname_ = f.name();