Skip to content
Snippets Groups Projects
Commit b8d149eb authored by Stanley Goldman's avatar Stanley Goldman
Browse files

Capturing a possible error cause in a log message and returning to prevent an exception

parent b5c1dee7
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