Skip to content

[BUG] segfault when using mlx_create_cursor #72

Closed
@xApologize

Description

@xApologize

Describe the bug
When i try to change the cursor in this small project, it segfaults when trying to do mlx_create_cursor

To Reproduce

#include <stdio.h>
#include "MLX42/MLX42.h"

int32_t	main(void)
{
	mlx_t	*mlx;

	mlx = mlx_init(500, 500, "MLX42", true);
	if (!mlx)
		return (0);
	printf("ok\n");
	mlx_texture_t* tex = mlx_load_png("./GitHub-Mark-32px.png");
	printf("ok1\n");
	mlx_create_cursor(tex);
	printf("ok2\n");
	mlx_loop(mlx);
	mlx_terminate(mlx);
	return (1);
}

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2023-01-20 at 1 36 46 PM

Desktop (please complete the following information):

  • OS: MacOS
  • Version Catalina 10.15.7

Additional context
GitHub-Mark-32px the png i use.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working or should get fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions