commit 25e6b5da39b2f9d5e1ce7c66baaf0ce968c8dc1a
Author: Enrico Forestieri <for...@lyx.org>
Date:   Sun Jan 8 23:11:04 2017 +0100

    Avoid useless warning from Qt
    
    When cloning InsetExternal, the tempname_ member of InsetExternalParams
    has yet to be initialized. So, trying to remove it causes the warning
    "QFile::remove: Empty or null file name".
---
 src/insets/InsetExternal.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp
index b68a09d..00c304a 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(); 

Reply via email to