# HG changeset patch # User Chris Cannam # Date 1163429337 0 # Node ID 51f34d378a3a91eddcc4574744656f069364f3be # Parent e269ae6ed008c6bb3654ce7da412acff37639674 * Somewhat better handling of running out of memory or disc space diff -r e269ae6ed008 -r 51f34d378a3a transform/FeatureExtractionPluginTransform.cpp --- a/transform/FeatureExtractionPluginTransform.cpp Fri Nov 10 17:45:26 2006 +0000 +++ b/transform/FeatureExtractionPluginTransform.cpp Mon Nov 13 14:48:57 2006 +0000 @@ -29,6 +29,8 @@ #include "data/model/FFTModel.h" #include "data/model/WaveFileModel.h" +#include + #include #include @@ -259,6 +261,15 @@ m_context.stepSize, m_context.blockSize, false); + if (!model->isOK()) { + QMessageBox::critical + (0, tr("FFT cache failed"), + tr("Failed to create the FFT model for this transform.\n" + "There may be insufficient memory or disc space to continue.")); + delete model; + setCompletion(100); + return; + } model->resume(); fftModels.push_back(model); }