void GuiApplication::gotoBookmark(unsigned int idx, bool openFile,
bool switchToBuffer)
{
- LASSERT(current_view_, /**/);
if (!theSession().bookmarks().isValid(idx))
return;
BookmarksSection::Bookmark const & bm =
string lyx_name;
string const x11_name = split(to_utf8(cmd.argument()), lyx_name, ' ');
if (lyx_name.empty() || x11_name.empty()) {
- current_view_->message(
+ if (current_view_)
+ current_view_->message(
_("Syntax: set-color <lyx_name> <x11_name>"));
break;
}
// Do nothing if we have nothing (JMarc)
if (!keysym.isOK()) {
LYXERR(Debug::KEY, "Empty kbd action (probably composing)");
- current_view_->restartCursor();
+ if (current_view_)
+ current_view_->restartCursor();
return;
}
// why not return already here if action == -1 and
// num_bytes == 0? (Lgb)
- if (d->keyseq.length() > 1)
+ if (d->keyseq.length() > 1 && current_view_)
current_view_->message(d->keyseq.print(KeySequence::ForGui));
FuncRequest::KEYBOARD);
} else {
LYXERR(Debug::KEY, "Unknown, !isText() - giving up");
- current_view_->message(_("Unknown function."));
- current_view_->restartCursor();
+ if (current_view_) {
+ current_view_->message(_("Unknown function."));
+ current_view_->restartCursor();
+ }
return;
}
}