mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 22:30:03 -04:00
Fix: handle IconData::default() without crashing (#3842)
* Closes https://github.com/emilk/egui/issues/3839
This commit is contained in:
@@ -170,6 +170,13 @@ pub struct IconData {
|
||||
pub height: u32,
|
||||
}
|
||||
|
||||
impl IconData {
|
||||
#[inline]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.rgba.is_empty()
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for IconData {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("IconData")
|
||||
|
||||
Reference in New Issue
Block a user