summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-groups-windows-double-cairo.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-groups-windows-double-cairo.adb')
-rw-r--r--src/fltk-widgets-groups-windows-double-cairo.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fltk-widgets-groups-windows-double-cairo.adb b/src/fltk-widgets-groups-windows-double-cairo.adb
index 75cf50a..eedcbd1 100644
--- a/src/fltk-widgets-groups-windows-double-cairo.adb
+++ b/src/fltk-widgets-groups-windows-double-cairo.adb
@@ -6,6 +6,7 @@
with
+ Ada.Assertions,
Interfaces.C,
System.Address_To_Access_Conversions;
@@ -13,6 +14,11 @@ with
package body FLTK.Widgets.Groups.Windows.Double.Cairo is
+ package Chk renames Ada.Assertions;
+
+
+
+
------------------------
-- Functions From C --
------------------------
@@ -74,9 +80,12 @@ package body FLTK.Widgets.Groups.Windows.Double.Cairo is
Ada_Object : access Cairo_Window'Class :=
Cairo_Convert.To_Pointer (Ada_Addr);
begin
+ pragma Assert (Ada_Object /= null);
if Ada_Object.My_Func /= null then
Ada_Object.My_Func (Cairo_Window (Ada_Object.all), Storage.To_Address (Cairo_Addr));
end if;
+ exception
+ when Chk.Assertion_Error => raise Internal_FLTK_Error;
end Cairo_Draw_Hook;