Handle invalid image URL
This commit is contained in:
parent
a76cb6417f
commit
c3be90826f
@ -301,7 +301,17 @@ namespace ShareX.HelpersLib
|
|||||||
isImageLoading = true;
|
isImageLoading = true;
|
||||||
Text = Resources.MyPictureBox_LoadImageAsync_Loading_image___;
|
Text = Resources.MyPictureBox_LoadImageAsync_Loading_image___;
|
||||||
lblStatus.Visible = true;
|
lblStatus.Visible = true;
|
||||||
pbMain.LoadAsync(path);
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pbMain.LoadAsync(path);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
lblStatus.Visible = false;
|
||||||
|
isImageLoading = false;
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user