]> khamidou — GitHub mirrors - electron.git/commitdiff
Allow "detail" to be empty
authorCheng Zhao <zcbenz@gmail.com>
Tue, 7 Jul 2015 09:08:30 +0000 (17:08 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 7 Jul 2015 09:21:30 +0000 (17:21 +0800)
atom/browser/ui/message_box_gtk.cc

index 4a78398b0fa3971bb6d1cbb0e2fddfe79a3802e4..09bff182a168f3870a7e3db52dfef40c8710d371 100644 (file)
@@ -42,9 +42,9 @@ class GtkMessageBox {
         GetMessageType(type),  // type
         GTK_BUTTONS_NONE,  // no buttons
         "%s", message.c_str());
-    gtk_message_dialog_format_secondary_text(
-        GTK_MESSAGE_DIALOG(dialog_),
-        "%s", detail.empty() ? nullptr : detail.c_str());
+    if (!detail.empty())
+      gtk_message_dialog_format_secondary_text(
+          GTK_MESSAGE_DIALOG(dialog_), "%s", detail.c_str());
 
     // Set dialog's icon.
     if (!icon.isNull()) {