OSDN Git Service

wait until inventory is not null
authorole1986 <ole.k@web.de>
Mon, 11 Aug 2014 08:23:00 +0000 (10:23 +0200)
committerole1986 <ole.k@web.de>
Mon, 11 Aug 2014 08:23:00 +0000 (10:23 +0200)
plugins/Radegast.Plugin.EVOVend/EVOvendPlugin.cs

index 8a79683..99fc9e9 100644 (file)
@@ -358,7 +358,11 @@ namespace Radegast.Plugin.EVOVend
         {
             Manager = Client.Inventory;
             Inventory = Manager.Store;
-            Inventory.RootFolder.OwnerID = Client.Self.AgentID;
+            if (Inventory == null)
+            {
+                instance.MainForm.TabConsole.DisplayNotificationInChat(pluginName + ": Waiting for Inventory...");
+                return;
+            }
 
             if (isSending == true)
             {
@@ -366,6 +370,8 @@ namespace Radegast.Plugin.EVOVend
                 return;
             }
             isSending = true;
+            
+            Inventory.RootFolder.OwnerID = Client.Self.AgentID;
 
             instance.MainForm.TabConsole.DisplayNotificationInChat(pluginName + ": Queue List");