* Bug #12232 fixed - There were several memleaks in various fillers.
+* Bug #12234 fixed - Graphics could crash with an invalid property.
+
* Bug #12235 fixed - Matplot did not update on color_map change.
* Bug #12238 fixed - [d v] = eigs(A) was broken for sparse matrices.
dataObject = (*m_dataMap)[std::string(_pstID)];
+ if (dataObject == NULL)
+ {
+ *_pvData = NULL;
+ return;
+ }
+
property = dataObject->getPropertyFromName(_iName);
+ if (property == UNKNOWN_DATA_PROPERTY)
+ {
+ *_pvData = NULL;
+ return;
+ }
dataObject->getDataProperty(property, _pvData);
}
void DataModel::deleteDataObject(char const* _pstID)
{
- std::map<std::string, Data3D*>::iterator it = m_dataMap->find(std::string(_pstID));
+ std::map<std::string, Data3D*>::iterator it = m_dataMap->find(std::string(_pstID));
if (it != m_dataMap->end() && it->second != NULL)
{
delete it->second;
- m_dataMap->erase(it);
+ m_dataMap->erase(it);
}
-
+
/*Data3D* newObject = (*m_dataMap)[std::string(_pstID)];
- if (newObject != NULL)
- {
- delete newObject;
- }
+ if (newObject != NULL)
+ {
+ delete newObject;
+ }
- m_dataMap->erase(std::string(_pstID));*/
+ m_dataMap->erase(std::string(_pstID));*/
}
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+// <-- Non-regression test for bug 12234 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/12234
+//
+// <-- Short Description -->
+// Crash with invalid property
+refMsg = msprintf(_("''%s'' property does not exist for this handle.\n"), "data");
+e=gce();
+assert_checkerror("set(e, ''interp_color_vector'', 1:4)", refMsg);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH GRAPHIC -->
+
+// <-- Non-regression test for bug 12234 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/12234
+//
+// <-- Short Description -->
+// Crash with invalid property
+
+refMsg = msprintf(_("''%s'' property does not exist for this handle.\n"), "data");
+e=gce();
+assert_checkerror("set(e, ''interp_color_vector'', 1:4)", refMsg);