tb_image_widget: do not try to load empty data
This commit is contained in:
parent
bbf4eb0dda
commit
2b249da837
@ -28,7 +28,7 @@ public:
|
||||
|
||||
void SetImage(const TBImage &image) { m_image = image; }
|
||||
void SetImage(const TBStr &filename) { m_image = filename.IsEmpty() ? TBImage() : g_image_manager->GetImage(filename); }
|
||||
void SetImage(const char *data, size_t bytes) { m_image = g_image_manager->GetImage(data, bytes); }
|
||||
void SetImage(const char *data, size_t bytes) { m_image = bytes == 0 ? TBImage() : g_image_manager->GetImage(data, bytes); }
|
||||
void SetPreserveAspectRatio(bool preserve) { m_preserve_aspect_ratio = preserve; }
|
||||
|
||||
void SetAdaptTextColor(bool adapt) { m_adapt_text_color = adapt; }
|
||||
|
Loading…
Reference in New Issue
Block a user