From bfcd8a3991a6b4e175d5f368ef7ed1de6fa17c00 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 18 Jun 2016 18:34:30 -0400 Subject: [PATCH] Fix typo, and also check, if string is null. --- src/frontends/qt4/GuiRef.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index 795736c728..549e3ccbc6 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -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(); -- 2.39.5