Skip to content

Commit

Permalink
meaningful error when cannot find GUI icon
Browse files Browse the repository at this point in the history
  • Loading branch information
aoterodelaroza committed Nov 30, 2023
1 parent 4780629 commit e6e3d65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ module subroutine gui_start()
! set GUI icon
file = trim(critic_home) // dirsep // "assets" // dirsep // "critic2_icon.png" // c_null_char
icon%pixels = stbi_load(c_loc(file), icon%width, icon%height, idum, 4)
if (.not.c_associated(icon%pixels)) &
call ferror('gui_start','Could not find GUI assets: have you set CRITIC_HOME?',faterr)
call glfwSetWindowIcon(rootwin, 1, c_loc(icon))
call stbi_image_free(icon%pixels)

Expand Down

0 comments on commit e6e3d65

Please sign in to comment.