[smuxi/stable] Engine-JabbR: fixed potential NRE in CommandHelp() when issued from hooks



commit 15b76ff92d4ca63105cf9b80b1f0889e28531517
Author: Mirco Bauer <meebey meebey net>
Date:   Thu Dec 26 14:14:49 2013 +0100

    Engine-JabbR: fixed potential NRE in CommandHelp() when issued from hooks
    
    CommandModel.FrontendManager is null when issued from hooks

 src/Engine-JabbR/JabbrProtocolManager.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Engine-JabbR/JabbrProtocolManager.cs b/src/Engine-JabbR/JabbrProtocolManager.cs
index d6cf983..a32874c 100644
--- a/src/Engine-JabbR/JabbrProtocolManager.cs
+++ b/src/Engine-JabbR/JabbrProtocolManager.cs
@@ -101,7 +101,7 @@ namespace Smuxi.Engine
             var builder = CreateMessageBuilder().
                 AppendEventPrefix().
                 AppendHeader(_("JabbR Commands"));
-            cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+            Session.AddMessageToFrontend(cmd, builder.ToMessage());
 
             string[] help = {
                 "connect jabbr username password",
@@ -112,7 +112,7 @@ namespace Smuxi.Engine
                 builder = CreateMessageBuilder();
                 builder.AppendEventPrefix();
                 builder.AppendText(line);
-                cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+                Session.AddMessageToFrontend(cmd, builder.ToMessage());
             }
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]