]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiRef.cpp
Fix typo, and also check if string is null.
[features.git] / src / frontends / qt4 / GuiRef.cpp
index 795736c7283048d72aa9442adaed2014332e5fb3..549e3ccbc62bd6294522045febe0dbe68ba9ac4f 100644 (file)
@@ -118,7 +118,8 @@ void GuiRef::gotoClicked()
        // to which we are going (or from which we are returning) is
        // restored in the dialog. It's a bit of a hack, but it works,
        // and no-one seems to have any better idea.
-       bool const toggled = last_reference_.empty();
+       bool const toggled = 
+               last_reference_.isEmpty() || last_reference_.isNull();
        if (toggled)
                last_reference_ = referenceED->text();
        gotoRef();