From ddaa53d3761be0e96352e75e2002072d92389d10 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Mon, 23 Aug 2004 18:30:28 +0000 Subject: [PATCH] Don't try to convert NULL into a String. --- src/ecore_x/rb_window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ecore_x/rb_window.c b/src/ecore_x/rb_window.c index 5c688f7..f5af7c7 100644 --- a/src/ecore_x/rb_window.c +++ b/src/ecore_x/rb_window.c @@ -1,5 +1,5 @@ /* - * $Id: rb_window.c 95 2004-08-23 11:05:15Z tilman $ + * $Id: rb_window.c 97 2004-08-23 18:30:28Z tilman $ * * Copyright (C) 2004 ruby-ecore team (see AUTHORS) * @@ -272,9 +272,13 @@ static VALUE c_parent_get (VALUE self) static VALUE c_title_get (VALUE self) { + char *s; + GET_OBJ (self, RbWindow, win); - return rb_str_new2 (ecore_x_window_prop_title_get (win->real)); + s = ecore_x_window_prop_title_get (win->real); + + return s ? rb_str_new2 (s) : Qnil; } static VALUE c_title_set (VALUE self, VALUE val) -- 2.30.2