[smuxi/stable] Frontend: fixed potential NRE with commands issued from command hooks



commit 382f88cd7e63106f1181273da62330847dbe9473
Author: Mirco Bauer <meebey meebey net>
Date:   Thu Dec 26 14:11:24 2013 +0100

    Frontend: fixed potential NRE with commands issued from command hooks

 src/Frontend/CommandManager.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Frontend/CommandManager.cs b/src/Frontend/CommandManager.cs
index 384dcd0..84644c4 100644
--- a/src/Frontend/CommandManager.cs
+++ b/src/Frontend/CommandManager.cs
@@ -145,7 +145,7 @@ namespace Smuxi.Frontend
             handled = f_Session.Command(cmd);
             IProtocolManager pm = null;
             if (!handled) {
-                if (cmd.Chat is SessionChatModel) {
+                if (cmd.Chat is SessionChatModel && cmd.FrontendManager != null) {
                     pm = cmd.FrontendManager.CurrentProtocolManager;
                 } else {
                     pm = cmd.Chat.ProtocolManager;


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