Only initialize edge_spacing_func if glfw init succeeds
This commit is contained in:
@@ -1462,8 +1462,8 @@ glfw_init(PyObject UNUSED *self, PyObject *args) {
|
|||||||
glfwSetDrawTextFunction(draw_text_callback);
|
glfwSetDrawTextFunction(draw_text_callback);
|
||||||
#endif
|
#endif
|
||||||
get_window_dpi(NULL, &global_state.default_dpi.x, &global_state.default_dpi.y);
|
get_window_dpi(NULL, &global_state.default_dpi.x, &global_state.default_dpi.y);
|
||||||
|
edge_spacing_func = edge_sf; Py_INCREF(edge_spacing_func);
|
||||||
}
|
}
|
||||||
edge_spacing_func = edge_sf; Py_INCREF(edge_spacing_func);
|
|
||||||
Py_INCREF(ans);
|
Py_INCREF(ans);
|
||||||
return ans;
|
return ans;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user