From 21c389c43ea59705cd02ac6a21a25c10bc84d585 Mon Sep 17 00:00:00 2001 From: Paul Leroy Date: Wed, 3 May 2023 14:34:14 +0200 Subject: [PATCH] Fixed: crash when point clouds are not associated to labels in the dialog --- CMakeLists.txt | 2 +- q3DMASC.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23cd04e..104ff60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ if (INSTALL_Q3DMASC_PLUGIN) project( Q3DMASC_PLUGIN ) AddPlugin( NAME ${PROJECT_NAME} ) - set(Q3DMASC_PLUGIN_VERSION "0.6+") + set(Q3DMASC_PLUGIN_VERSION "0.7") include( CMakePolicies NO_POLICY_SCOPE ) diff --git a/q3DMASC.cpp b/q3DMASC.cpp index 4d7359f..b549745 100644 --- a/q3DMASC.cpp +++ b/q3DMASC.cpp @@ -346,7 +346,10 @@ void q3DMASCPlugin::doTrainAction() for (masc::Tools::NamedClouds::iterator it = loadedClouds.begin(); it != loadedClouds.end(); ++it) { - m_app->dispToConsole(it.key() + " = " + it.value()->getName(), ccMainAppInterface::STD_CONSOLE_MESSAGE); + if (it.value()) + m_app->dispToConsole(it.key() + " = " + it.value()->getName(), ccMainAppInterface::STD_CONSOLE_MESSAGE); + else + ccLog::Warning(it.key() + " is not associated to a point cloud"); } //test role