is_handle_valid(f) always returned true even if f was closed. 78/8978/2
Adeline CARNIS [Tue, 11 Sep 2012 10:15:35 +0000 (12:15 +0200)]
Change-Id: I579fe602d98a11c31fe923034a1b7402bc34abbc

scilab/modules/graphic_objects/src/cpp/ScilabView.cpp

index 362a749..a98094b 100644 (file)
@@ -334,6 +334,10 @@ long ScilabView::getObjectHandle(char const* UID)
 char const* ScilabView::getObjectFromHandle(long handle)
 {
     __uidList_iterator it = m_uidList.find(handle);
+    if (it == m_uidList.end())
+    {
+        return NULL;
+    }
 
     return it->second.c_str();
 }