File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
internal_filesystem/lib/mpos Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,9 @@ def _launch_activity(intent, result_callback=None):
346346 activity ._result_callback = result_callback # Pass callback to activity
347347 start_time = utime .ticks_ms ()
348348 # Remove objects from previous screens from the focus group:
349- lv .group_get_default ().remove_all_objs () # might be better to save and restore the group for "back" actions
349+ group = lv .group_get_default ()
350+ if group : # on esp32 this may not be set
351+ group .remove_all_objs () # might be better to save and restore the group for "back" actions
350352 activity .onCreate ()
351353 end_time = utime .ticks_diff (utime .ticks_ms (), start_time )
352354 print (f"apps.py _launch_activity: activity.onCreate took { end_time } ms" )
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ def get():
1111def paste_text (text ): # called when CTRL-V is pressed on the keyboard
1212 print (f"mpos.ui.clipboard.py paste_text adding { text } " )
1313 group = lv .group_get_default ()
14+ if not group :
15+ return
1416 focused_obj = group .get_focused ()
1517 if focused_obj and isinstance (focused_obj , lv .textarea ):
1618 focused_obj .add_text (text )
You can’t perform that action at this time.
0 commit comments