Skip to content

Commit

Permalink
Only close the file if its opened. :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueAndi committed Jun 11, 2024
1 parent 47b0504 commit 8ef232c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/YAWidgets/src/GifImgPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ class GifImgPlayer
*/
~GifImgPlayer()
{
m_fd.close();
if (true == m_fd)
{
m_fd.close();
}

if (nullptr != m_globalColorTable)
{
Expand Down

0 comments on commit 8ef232c

Please sign in to comment.