diff dwt/widgets/Group.d @ 248:34409a2fc053

Fix call OS.gtk_label_set_text_with_mnemonic with valid ptr, even for zero length strings.
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 19:00:47 +0200
parents 380bad9f6852
children 5a30aa9820f3
line wrap: on
line diff
--- a/dwt/widgets/Group.d	Mon May 19 22:20:13 2008 +0200
+++ b/dwt/widgets/Group.d	Thu May 22 19:00:47 2008 +0200
@@ -285,7 +285,7 @@
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     text = string;
     char [] chars = fixMnemonic (string);
-    OS.gtk_label_set_text_with_mnemonic (cast(GtkLabel*)labelHandle, toStringz(chars));
+    OS.gtk_label_set_text_with_mnemonic (cast(GtkLabel*)labelHandle, chars.toStringzValidPtr());
     if (string.length !is 0) {
         if (OS.gtk_frame_get_label_widget (cast(GtkFrame*)handle) is null) {
             OS.gtk_frame_set_label_widget (cast(GtkFrame*)handle, labelHandle);