Fix the crash in widget-view when this is not added to Window. 64/267664/2 accepted/tizen/unified/20211215.125810 submit/tizen/20211214.091051
authorWonsik Jung <sidein@samsung.com>
Wed, 8 Dec 2021 09:51:30 +0000 (18:51 +0900)
committerWonsik Jung <sidein@samsung.com>
Thu, 9 Dec 2021 01:49:35 +0000 (10:49 +0900)
When the widget-view is not added, a crash occurs.
Because window is usded Widget::IsOutOfScreen().
To fix, the checker is added and return value is false.

Change-Id: I5b87be18f2798cf0267628743b5b42624ef4ee14

widget_viewer_dali/internal/widget_view/widget_view_impl.cpp

index d165adfba289d00523dff0864815c0270a14c2fc..050d92576f5c15537c7681325f8941f2d7d70623 100644 (file)
@@ -338,6 +338,12 @@ bool WidgetView::ResumeWidgetInternally()
 bool WidgetView::IsOutOfScreen()
 {
   Actor self = Self();
+  if(self.GetProperty<bool>(Actor::Property::CONNECTED_TO_SCENE) == false)
+  {
+    DALI_LOG_ERROR("This is not added to Window\n");
+    return true;
+  }
+
   Window window = DevelWindow::Get( self );
   RenderTaskList taskList = window.GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );