Hi,
Issue found by Coverity Scan.
CID 210578 (#1 of 1): Dereference null return value (NULL_RETURNS)

--- a\srccontrols\matrix\iupmat_getset.c        Tue Sep 19 12:43:20 2017
+++ b\srccontrols\matrix\iupmat_getset.c        Tue Jan 16 23:52:24 2018
@@ -138,7 +138,14 @@
   {
     /* only called in callback mode */
     sIFnii value_cb = (sIFnii)IupGetCallback(ih, "VALUE_CB");
-    value = value_cb(ih, lin, col);
+
+    if (value_cb)
+    {
+       value = value_cb(ih, lin, col);
+    } else
+    {
+       value = NULL;
+    }
   }
   else
     value = ih->data->cells[lin][col].value;

Best.
Ranier

Attachment: iupmat_getset.patch
Description: iupmat_getset.patch

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to