1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:17:35 +00:00

PixelPaint: LayerListWidget::set_selected_layer now handles nullptr

This commit is contained in:
Gal Horowitz 2021-10-02 21:07:51 +03:00 committed by Andreas Kling
parent 87290e300e
commit be4485fe85

View file

@ -381,7 +381,7 @@ void LayerListWidget::set_selected_layer(Layer* layer)
if (!m_image) if (!m_image)
return; return;
if (layer->is_selected()) if (layer && layer->is_selected())
return; return;
for (size_t i = 0; i < m_image->layer_count(); ++i) { for (size_t i = 0; i < m_image->layer_count(); ++i) {