diff --git a/Library/LibraryRowItemPart.cs b/Library/LibraryRowItemPart.cs index d8a39cea5..e956036a2 100644 --- a/Library/LibraryRowItemPart.cs +++ b/Library/LibraryRowItemPart.cs @@ -379,15 +379,18 @@ namespace MatterHackers.MatterControl.PrintLibrary { var printItemWrapper = await this.GetPrintItemWrapperAsync(); - string pathAndFile = printItemWrapper.FileLocation; - if (File.Exists(pathAndFile)) + if (printItemWrapper != null) { - OpenPartViewWindow(openMode); - } - else - { - string message = String.Format("Cannot find\n'{0}'.\nWould you like to remove it from the library?", pathAndFile); - StyledMessageBox.ShowMessageBox(null, message, "Item not found", StyledMessageBox.MessageType.YES_NO); + string pathAndFile = printItemWrapper.FileLocation; + if (File.Exists(pathAndFile)) + { + OpenPartViewWindow(openMode); + } + else + { + string message = String.Format("Cannot find\n'{0}'.\nWould you like to remove it from the library?", pathAndFile); + StyledMessageBox.ShowMessageBox(null, message, "Item not found", StyledMessageBox.MessageType.YES_NO); + } } } diff --git a/MatterControlApplication.cs b/MatterControlApplication.cs index dc1dc8ff6..819e135cd 100644 --- a/MatterControlApplication.cs +++ b/MatterControlApplication.cs @@ -535,7 +535,7 @@ namespace MatterHackers.MatterControl if (ShowMemoryUsed) { long memory = GC.GetTotalMemory(false); - this.Title = "Allocated = {0:n0} : {1:000}ms, d{2} Size = {3}x{4}, onIdle = {5:00}:{6:00}, drawCount = {7}".FormatWith(memory, millisecondTimer.GetAverage(), drawCount++, this.Width, this.Height, UiThread.CountExpired, UiThread.Count, GuiWidget.DrawCount); + this.Title = "Allocated = {0:n0} : {1:000}ms, d{2} Size = {3}x{4}, onIdle = {5:00}:{6:00}, widgetsDrawn = {7}".FormatWith(memory, millisecondTimer.GetAverage(), drawCount++, this.Width, this.Height, UiThread.CountExpired, UiThread.Count, GuiWidget.DrawCount); if (DoCGCollectEveryDraw) { GC.Collect();