Merge pull request #7298 from ksherlock/picture_image_device_get_bitmap

picture_image_device::get_bitmap can return a null reference
This commit is contained in:
ajrhacker 2020-09-27 15:23:32 -04:00 committed by GitHub
commit b89c07596f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ void a2bus_computereyes2_device::write_c0nx(uint8_t offset, uint8_t data)
m_x = m_y = 0;
std::fill_n(m_a2_bitmap, 280*193, 0);
m_bitmap = &m_picture->get_bitmap();
m_bitmap = m_picture->get_bitmap();
if (m_bitmap)
{
// convert arbitrary sized ARGB32 image to a 188x193 image with 256 levels of grayscale

View File

@ -82,7 +82,7 @@ WRITE_LINE_MEMBER(apple2_compeyes_device::an0_w)
std::fill_n(m_a2_bitmap, 280*192, 0);
m_bitmap = &m_picture->get_bitmap();
m_bitmap = m_picture->get_bitmap();
if (m_bitmap)
{
// convert arbitrary sized ARGB32 image to a 280x192 image with 256 levels of grayscale

View File

@ -41,7 +41,7 @@ public:
virtual bool is_reset_on_load() const noexcept override { return false; }
virtual const char *file_extensions() const noexcept override { return "png"; }
bitmap_argb32 &get_bitmap() { return *m_picture; }
bitmap_argb32 *get_bitmap() { return m_picture; }
protected:
// device-level overrides