diff options
Diffstat (limited to 'src/fltk-images.adb')
-rw-r--r-- | src/fltk-images.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fltk-images.adb b/src/fltk-images.adb index b8dff24..f86071e 100644 --- a/src/fltk-images.adb +++ b/src/fltk-images.adb @@ -165,7 +165,9 @@ package body FLTK.Images is if This.Void_Ptr /= System.Null_Address and then This in Image'Class then - free_fl_image (This.Void_Ptr); + if This.Needs_Dealloc then + free_fl_image (This.Void_Ptr); + end if; This.Void_Ptr := System.Null_Address; end if; end Finalize; |