summaryrefslogtreecommitdiff
path: root/src/fltk-images-pixmaps-xpm.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-images-pixmaps-xpm.adb')
-rw-r--r--src/fltk-images-pixmaps-xpm.adb6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/fltk-images-pixmaps-xpm.adb b/src/fltk-images-pixmaps-xpm.adb
index d20e8f7..3b170ec 100644
--- a/src/fltk-images-pixmaps-xpm.adb
+++ b/src/fltk-images-pixmaps-xpm.adb
@@ -29,13 +29,9 @@ package body FLTK.Images.Pixmaps.XPM is
overriding procedure Finalize
(This : in out XPM_Image) is
begin
- if This.Void_Ptr /= Null_Pointer and then
- This in XPM_Image'Class
- then
+ if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then
free_fl_xpm_image (This.Void_Ptr);
- This.Void_Ptr := Null_Pointer;
end if;
- Finalize (Pixmap (This));
end Finalize;