Skip to content
Snippets Groups Projects
Commit 26775b31 authored by Stanley Goldman's avatar Stanley Goldman Committed by Andreia Gaita
Browse files

Don't throw if texture is null, it spams the console needlessly

Textures are getting disposed from under us, and if we try to
use them in the project window, the console gets filled with
exceptions that are useless to the user. Catch and return in
these cases.
parent 4f7e1966
No related branches found
No related tags found
No related merge requests found
......@@ -215,7 +215,14 @@ namespace GitHub.Unity
}
var status = index >= 0 ? entries[index].Status : GitFileStatus.None;
var texture = Styles.GetFileStatusIcon(status, indexLock >= 0);
var isLocked = indexLock >= 0;
var texture = Styles.GetFileStatusIcon(status, isLocked);
if (texture == null)
{
logger.Warning("Unable to retrieve texture for Status: {0} IsLocked:{1}", isLocked);
return;
}
Rect rect;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment