[pan2] fix npe



commit e2ca6d2b989d336006e7ba5e60b5150a15a03729
Author: Heinrich MÃller <henmull src gnome org>
Date:   Sun Dec 23 17:29:38 2012 +0100

    fix npe

 pan/tasks/socket-impl-openssl.cc |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/pan/tasks/socket-impl-openssl.cc b/pan/tasks/socket-impl-openssl.cc
index 65659b3..1df8391 100644
--- a/pan/tasks/socket-impl-openssl.cc
+++ b/pan/tasks/socket-impl-openssl.cc
@@ -4,7 +4,7 @@
  * Copyright (C) 2002-2006  Charles Kerr <charles rebelbase com>
  *
  * This file
- * Copyright (C) 2011 Heinrich Mïller <henmull src gnome org>
+ * Copyright (C) 2011 Heinrich MÃller <henmull src gnome org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -343,11 +343,14 @@ GIOChannelSocketGnuTLS :: open  (const StringView& address, int port, std::strin
 {
   _host.assign (address.str, address.len);
   _channel = create_channel (address, port, setme_err);
+  if (_channel)
+  {
 #ifdef G_OS_WIN32
-  _id = g_io_channel_win32_get_fd(_channel);
+      _id = g_io_channel_win32_get_fd(_channel);
 #else
-   _id = g_io_channel_unix_get_fd(_channel);
+      _id = g_io_channel_unix_get_fd(_channel);
 #endif // G_OS_WIN32
+  }
   return _channel != 0;
 }
 



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