InfiniTime.git

commit c9e836a02eda005758d3c1b047ad5ed25498f816

Author: Jean-François Milants <jf@codingfield.com>

G7710 and Infineat : close the files after having verified that they exist.

 src/displayapp/screens/WatchFaceCasioStyleG7710.cpp | 3 +++
 src/displayapp/screens/WatchFaceInfineat.cpp | 3 +++


diff --git a/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp b/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp
index 525c2eebc0ad1302a8f300fa4ab5bcbb7c2210bf..bdae0d428e5f22c776b9a9d0f770279583bf308b 100644
--- a/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp
+++ b/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp
@@ -340,13 +340,16 @@   if (filesystem.FileOpen(&file, "/fonts/lv_font_dots_40.bin", LFS_O_RDONLY) < 0) {
     return false;
   }
 
+  filesystem.FileClose(&file);
   if (filesystem.FileOpen(&file, "/fonts/7segments_40.bin", LFS_O_RDONLY) < 0) {
     return false;
   }
 
+  filesystem.FileClose(&file);
   if (filesystem.FileOpen(&file, "/fonts/7segments_115.bin", LFS_O_RDONLY) < 0) {
     return false;
   }
 
+  filesystem.FileClose(&file);
   return true;
 }




diff --git a/src/displayapp/screens/WatchFaceInfineat.cpp b/src/displayapp/screens/WatchFaceInfineat.cpp
index 01b425da07a351c7d0f929abfbbea076f63ec6b4..bd4e4ac84f31ecb0a100cadec324ed2b051bf3e9 100644
--- a/src/displayapp/screens/WatchFaceInfineat.cpp
+++ b/src/displayapp/screens/WatchFaceInfineat.cpp
@@ -617,13 +617,16 @@   if (filesystem.FileOpen(&file, "/fonts/teko.bin", LFS_O_RDONLY) < 0) {
     return false;
   }
 
+  filesystem.FileClose(&file);
   if (filesystem.FileOpen(&file, "/fonts/bebas.bin", LFS_O_RDONLY) < 0) {
     return false;
   }
 
+  filesystem.FileClose(&file);
   if (filesystem.FileOpen(&file, "/images/pine_small.bin", LFS_O_RDONLY) < 0) {
     return false;
   }
 
+  filesystem.FileClose(&file);
   return true;
 }