diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-04-07 10:48:49 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-07-07 15:19:43 +0000 |
commit | 7f638e54eeee25399c38d404882e1c943626c36a (patch) | |
tree | acfafecdc79d2b3056361460918d4b9f8e4446c1 | |
parent | 99bf5064077ec8b3daef592cf076b72cb82b7693 (diff) | |
download | rockbox-7f638e54eeee25399c38d404882e1c943626c36a.tar.gz rockbox-7f638e54eeee25399c38d404882e1c943626c36a.zip |
RFC: Fix a couple more dangling stack-allocated viewports
They could end up getting referenced after the stack has been popped.
Change-Id: I12abbf3f436ecfde76a37f2623a044915800d2b2
-rw-r--r-- | apps/gui/pitchscreen.c | 8 | ||||
-rw-r--r-- | apps/recorder/recording.c | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c index a6e6e42c43..871921a10f 100644 --- a/apps/gui/pitchscreen.c +++ b/apps/gui/pitchscreen.c | |||
@@ -1062,7 +1062,15 @@ int gui_syncpitchscreen_run(void) | |||
1062 | new_speed = 0; | 1062 | new_speed = 0; |
1063 | } | 1063 | } |
1064 | } | 1064 | } |
1065 | |||
1065 | pcmbuf_set_low_latency(false); | 1066 | pcmbuf_set_low_latency(false); |
1066 | pop_current_activity(); | 1067 | pop_current_activity(); |
1068 | |||
1069 | /* Clean up */ | ||
1070 | FOR_NB_SCREENS(i) | ||
1071 | { | ||
1072 | screens[i].set_viewport(NULL); | ||
1073 | } | ||
1074 | |||
1067 | return 0; | 1075 | return 0; |
1068 | } | 1076 | } |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 36331a72f3..bf69e8f781 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -1084,7 +1084,7 @@ bool recording_screen(bool no_source) | |||
1084 | pm_y[i] = font_get(vp_top[i].font)->height * 2; | 1084 | pm_y[i] = font_get(vp_top[i].font)->height * 2; |
1085 | trig_ypos[i] = font_get(vp_top[i].font)->height * 3; | 1085 | trig_ypos[i] = font_get(vp_top[i].font)->height * 3; |
1086 | if(compact_view[i]) | 1086 | if(compact_view[i]) |
1087 | trig_ypos[i] -= (font_get(vp_top[i].font)->height)/2; | 1087 | trig_ypos[i] -= (font_get(vp_top[i].font)->height)/2; |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | /* init the bottom list */ | 1090 | /* init the bottom list */ |
@@ -1803,8 +1803,10 @@ rec_abort: | |||
1803 | rec_status &= ~RCSTAT_IN_RECSCREEN; | 1803 | rec_status &= ~RCSTAT_IN_RECSCREEN; |
1804 | sound_settings_apply(); | 1804 | sound_settings_apply(); |
1805 | 1805 | ||
1806 | FOR_NB_SCREENS(i) | 1806 | FOR_NB_SCREENS(i) { |
1807 | screens[i].set_viewport(NULL); | ||
1807 | screens[i].setfont(FONT_UI); | 1808 | screens[i].setfont(FONT_UI); |
1809 | } | ||
1808 | 1810 | ||
1809 | /* if the directory was created or recording happened, make sure the | 1811 | /* if the directory was created or recording happened, make sure the |
1810 | browser is updated */ | 1812 | browser is updated */ |