From 3a2d44bd12a2e9d50ec36ee8cc689c6fb38c5301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6fferlein?= Date: Thu, 19 May 2022 22:14:07 +0200 Subject: [PATCH] Fixed #1081 (#1084) --- src/lay/lay/layMainWindow.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lay/lay/layMainWindow.cc b/src/lay/lay/layMainWindow.cc index e1690b121..f6dc15a82 100644 --- a/src/lay/lay/layMainWindow.cc +++ b/src/lay/lay/layMainWindow.cc @@ -2046,6 +2046,10 @@ MainWindow::cm_load_layer_props () void MainWindow::load_layer_props_from_file (const std::string &fn) { + if (! current_view ()) { + throw tl::Exception (tl::to_string (QObject::tr ("No view open to load the layer properties for"))); + } + int target_cv_index = -2; if (current_view ()->cellviews () > 1 && is_single_cv_layer_properties_file (fn)) {