diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 04a4cd981f00..297d9c4c0c44 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1012,9 +1012,9 @@ void unexpection_error_handler() // try to throw an exception and give the user chance to save their work #if !defined(_DEBUG) throw Base::Exception("Unexpected error occurred! Please save your work under a new file name and restart the application!"); -#endif - +#else terminate(); +#endif } #ifdef _MSC_VER // Microsoft compiler diff --git a/src/App/ColorModel.cpp b/src/App/ColorModel.cpp index eb01059760a3..a668d9ba63de 100644 --- a/src/App/ColorModel.cpp +++ b/src/App/ColorModel.cpp @@ -56,6 +56,7 @@ ColorModel& ColorModel::operator = (const ColorModel &rclM) return *this; delete [] _pclColors; + _pclColors = 0; _usColors = rclM._usColors; if (_usColors == 0) diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp index f737271239bd..6f4087bc96b7 100644 --- a/src/App/Expression.cpp +++ b/src/App/Expression.cpp @@ -773,7 +773,7 @@ class AverageCollector : public Collector { class StdDevCollector : public Collector { public: - StdDevCollector() : Collector() { } + StdDevCollector() : Collector(), n(0) { } void collect(Quantity value) { Collector::collect(value); diff --git a/src/App/ObjectIdentifier.cpp b/src/App/ObjectIdentifier.cpp index 0b089176b0cb..635fc1980b38 100644 --- a/src/App/ObjectIdentifier.cpp +++ b/src/App/ObjectIdentifier.cpp @@ -470,6 +470,7 @@ ObjectIdentifier::Component::Component(const String &_component, ObjectIdentifie , type(_type) , index(_index) , key(_key) + , keyIsString(false) { }