Commit 14a4a424 authored by Jan Möbius's avatar Jan Möbius

Emit warning in save object function, if object can't be retrieved

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20221 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4289663a
......@@ -67,7 +67,10 @@
*/
bool Core::saveObject( int _id, QString _filename ) {
BaseObjectData* object;
PluginFunctions::getObject(_id,object);
if ( !PluginFunctions::getObject(_id,object) ) {
emit log(LOGERR, tr("saveObject : cannot get object %1").arg(_id) );
return false;
}
QString file_extension = QFileInfo(_filename).suffix();
......@@ -123,7 +126,9 @@ bool Core::saveObject( int _id, QString _filename ) {
/// (existing files will be overwritten)
void Core::saveObject( int _id, QString _filename, int _pluginID ) {
BaseObjectData* object;
PluginFunctions::getObject(_id,object);
if ( !PluginFunctions::getObject(_id,object) ) {
emit log(LOGERR, tr("saveObject : cannot get object %1").arg(_id) );
}
if ( OpenFlipper::Options::gui() ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment