Fix the crash in widget-view when this is not added to Window. 00/267700/1 accepted/tizen/6.5/unified/20211213.212450 submit/tizen_6.5/20211209.112504 submit/tizen_6.5/20211213.025248
authorWonsik Jung <sidein@samsung.com>
Thu, 9 Dec 2021 01:58:28 +0000 (10:58 +0900)
committerWonsik Jung <sidein@samsung.com>
Thu, 9 Dec 2021 02:26:47 +0000 (11:26 +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: I18ea2c20ad5375de53cc979bedcb8455842e17a3

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 );