mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
gems: prevent invalid Nitpicker_buffer objects
This patch ensures that we never request a zero-sized virtual framebuffer from nitpicker even when instantiating the object with zero width or height. It therebu removes the burden of handling the resulting invalid framebuffer dataspace from the user of the Nitpicker_buffer utility.
This commit is contained in:
parent
f3cce99933
commit
101b868cd4
@ -86,7 +86,8 @@ struct Nitpicker_buffer
|
||||
Genode::Ram_session &ram)
|
||||
:
|
||||
ram(ram), nitpicker(nitpicker),
|
||||
mode(size.w(), size.h(), nitpicker.mode().format())
|
||||
mode(Genode::max(1UL, size.w()), Genode::max(1UL, size.h()),
|
||||
nitpicker.mode().format())
|
||||
{ }
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user