Mercurial > projects > dwt-linux
diff dwt/widgets/TreeColumn.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 | ce446666f5a2 |
children | 5a30aa9820f3 |
line wrap: on
line diff
--- a/dwt/widgets/TreeColumn.d Mon May 19 22:20:13 2008 +0200 +++ b/dwt/widgets/TreeColumn.d Thu May 22 19:00:47 2008 +0200 @@ -608,8 +608,7 @@ if (string is null) error (DWT.ERROR_NULL_ARGUMENT); super.setText (string); char [] chars = fixMnemonic (string); - char* buffer = tango.stdc.stringz.toStringz(chars); - OS.gtk_label_set_text_with_mnemonic (labelHandle, buffer); + OS.gtk_label_set_text_with_mnemonic (labelHandle, chars.toStringzValidPtr()); if (string.length !is 0) { OS.gtk_widget_show (labelHandle); } else {