*/}}
Pārlūkot izejas kodu

release fix for segmented data set

YimingWu 7 mēneši atpakaļ
vecāks
revīzija
a4fe29e01d
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      ouroperations.c

+ 3 - 1
ouroperations.c

@@ -2636,7 +2636,9 @@ void* ourget_LayerImageSegmentedInfo(OurLayer* l, int* r_size, int* r_is_copy){
     *r_is_copy=0; *r_size=sizeof(OurLayerImageSegmented); return &l->ReadSegmented;
 }
 void ourset_LayerImageSegmentedInfo(OurLayer* l, void* data, int size){
-    memcpy(&l->ReadSegmented,data,sizeof(OurLayerImageSegmented));
+    if (data && size) {
+        memcpy(&l->ReadSegmented, data, sizeof(OurLayerImageSegmented));
+    }
 }
 
 void ourset_LayerMove(OurLayer* l, int move){