Skip to content

Commit 33de765

Browse files
committed
Avoid crash in orbitals when switching molecules
Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
1 parent b1c67dd commit 33de765

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

avogadro/qtplugins/quantuminput/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ set(_prefix "${AvogadroLibs_SOURCE_DIR}/../avogadrogenerators")
1818
if(EXISTS "${_prefix}/generators.cmake")
1919
# Bundled generator scripts,
2020
include("${_prefix}/generators.cmake")
21-
message("We have ${input_generators}")
21+
# message("We have ${input_generators}")
2222
unset(_generators)
2323
foreach(gen ${input_generators})
2424
list(APPEND _generators "${_prefix}/${gen}")
2525
endforeach()
26-
message("We have ${_generators}")
26+
# debugging info with paths
27+
# message("We have ${_generators}")
2728

2829
option(INSTALL_TEST_INPUT_GENERATOR
2930
"Install a dummy input generator that is used to test generator scripts."

avogadro/qtplugins/surfaces/orbitals.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ void Orbitals::setMolecule(QtGui::Molecule* mol)
9595
m_currentRunningCalculation = -1;
9696
m_currentMeshCalculation = -1;
9797

98-
if (m_basis) {
99-
delete m_basis;
100-
m_basis = nullptr;
101-
}
102-
10398
loadBasis();
10499

105100
if (!m_basis || m_basis->electronCount() == 0 || !hasOrbitals)

0 commit comments

Comments
 (0)