From: Cheng Zhao Date: Tue, 7 Jul 2015 09:08:30 +0000 (+0800) Subject: Allow "detail" to be empty X-Git-Tag: v0.30.0~51^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=9b25c16980c659e8ea5a99c9416287388c6f86cd;p=electron.git Allow "detail" to be empty --- diff --git a/atom/browser/ui/message_box_gtk.cc b/atom/browser/ui/message_box_gtk.cc index 4a78398b..09bff182 100644 --- a/atom/browser/ui/message_box_gtk.cc +++ b/atom/browser/ui/message_box_gtk.cc @@ -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()) {