cvs: embed /php-irssi window.c

[email protected] ("Wez Furlong") Sun, 02 Feb 2003 21:05:56 -0000
Newsgroups php.embed.cvs
Message-ID <cvswez1044219956@cvsserver>
wez		Sun Feb  2 16:05:56 2003 EDT

  Modified files:              
    /embed/php-irssi	window.c 
  Log:
  Allow NULL window objects.
  
  
Index: embed/php-irssi/window.c
diff -u embed/php-irssi/window.c:1.2 embed/php-irssi/window.c:1.3
--- embed/php-irssi/window.c:1.2	Sun Feb  2 14:18:27 2003
+++ embed/php-irssi/window.c	Sun Feb  2 16:05:56 2003
@@ -14,7 +14,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: window.c,v 1.2 2003/02/02 19:18:27 wez Exp $
+  $Id: window.c,v 1.3 2003/02/02 21:05:56 wez Exp $
 */
 
 #include "php-irssi.h"
@@ -27,6 +27,11 @@
 {
 	struct php_irssi_obj_ref *ref;
 
+	if (window == NULL) {
+		ZVAL_NULL(obj);
+		return;
+	}
+	
 	php_irssi_create_wrapper(&ref, "WINDOW", obj TSRMLS_CC);
 	if (ref) {
 		ref->actual_ptr = window;