Fix the segmentation fault error cause by ImageAtlas when application quiting 91/53091/1
authorXiangyin Ma <x1.ma@samsung.com>
Tue, 1 Dec 2015 18:36:07 +0000 (18:36 +0000)
committerXiangyin Ma <x1.ma@samsung.com>
Tue, 1 Dec 2015 18:36:07 +0000 (18:36 +0000)
Change-Id: Idcb694b29b39c055060c26190d47a5a9eddb17c5

dali-toolkit/internal/image-atlas/atlas-packer.cpp

index 7178741..b061ec5 100644 (file)
@@ -176,12 +176,12 @@ void AtlasPacker::MergeToNonOccupied( Node* node )
   node->occupied = false;
   Node* parent = node->parent;
   // both child are not occupied, merge the space to parent
-  if( parent !=NULL && parent->child[0]->occupied == false && parent->child[1]->occupied == false)
+  if( parent != NULL && parent->child[0]->occupied == false && parent->child[1]->occupied == false)
   {
     delete parent->child[0];
     parent->child[0] = NULL;
     delete parent->child[1];
-    parent->child[0] = NULL;
+    parent->child[1] = NULL;
 
     MergeToNonOccupied( parent );
   }