Skip to content

Commit beb8c0b

Browse files
author
Kabuto_W
committed
Fix crash after deleting one of pictures.
1 parent 6c89eca commit beb8c0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SimilarImages/SimilarImages/Form1.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ private void lvw_Result_SelectedIndexChanged(object sender, EventArgs e)
259259
lb_Resolution2.Text = null;
260260
}
261261

262-
if (pictureBox1.Image.Width * pictureBox1.Image.Height >=
262+
if (pictureBox1.Image != null &&
263+
pictureBox2.Image != null &&
264+
pictureBox1.Image.Width * pictureBox1.Image.Height >=
263265
pictureBox2.Image.Width * pictureBox2.Image.Height)
264266
{
265267
lb_Resolution1.ForeColor = Color.Green;

0 commit comments

Comments
 (0)