Skip to content

Commit

Permalink
Merge pull request #74781 from Malcolmnixon/gles3_android
Browse files Browse the repository at this point in the history
Fix null-pointer dereference on Android systems when using gl_compatibility renderer
  • Loading branch information
clayjohn authored Mar 12, 2023
2 parents b31d00a + d186b74 commit 550a779
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions platform/android/display_server_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,16 +676,19 @@ void DisplayServerAndroid::cursor_set_custom_image(const Ref<Resource> &p_cursor

void DisplayServerAndroid::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
#if defined(VULKAN_ENABLED)
context_vulkan->set_vsync_mode(p_window, p_vsync_mode);
if (context_vulkan) {
context_vulkan->set_vsync_mode(p_window, p_vsync_mode);
}
#endif
}

DisplayServer::VSyncMode DisplayServerAndroid::window_get_vsync_mode(WindowID p_window) const {
#if defined(VULKAN_ENABLED)
return context_vulkan->get_vsync_mode(p_window);
#else
return DisplayServer::VSYNC_ENABLED;
if (context_vulkan) {
return context_vulkan->get_vsync_mode(p_window);
}
#endif
return DisplayServer::VSYNC_ENABLED;
}

void DisplayServerAndroid::reset_swap_buffers_flag() {
Expand Down

0 comments on commit 550a779

Please sign in to comment.