opengl.texture_set.stream: Handle case where 'Animation_view' is null.
This commit is contained in:
@@ -240,16 +240,30 @@ is
|
|||||||
Item : in Animation_view)
|
Item : in Animation_view)
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
Animation'output (Stream, Item.all);
|
if Item = null
|
||||||
|
then
|
||||||
|
Boolean'write (Stream, False);
|
||||||
|
else
|
||||||
|
Boolean'write (Stream, True);
|
||||||
|
Animation'output (Stream, Item.all);
|
||||||
|
end if;
|
||||||
end write;
|
end write;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
|
procedure read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
|
||||||
Item : out Animation_view)
|
Item : out Animation_view)
|
||||||
is
|
is
|
||||||
|
Item_not_null : Boolean;
|
||||||
begin
|
begin
|
||||||
Item := new Animation' (Animation'Input (Stream));
|
Boolean'read (Stream, Item_not_null);
|
||||||
|
|
||||||
|
if Item_not_null
|
||||||
|
then
|
||||||
|
Item := new Animation' (Animation'Input (Stream));
|
||||||
|
else
|
||||||
|
Item := null;
|
||||||
|
end if;
|
||||||
end read;
|
end read;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user