Merge remote-tracking branch 'origin/master' into YaSp
[scilab.git] / scilab / modules / graphics / src / c / getHandleProperty / get_mark_foreground_property.c
index 9eba364..ed2bb9f 100644 (file)
@@ -43,6 +43,12 @@ void* get_mark_foreground_property(void* _pvCtx, int iObjUID)
 
        getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_FOREGROUNDS__, jni_int, (void**)&piNumMarkForegrounds);
 
+       if (piNumMarkForegrounds == NULL)
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_foreground");
+               return NULL;
+       }
+
        if (numMarkForegrounds == 0)
        {
                getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, jni_int, &piMarkForeground);