mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-18 23:36:16 +00:00
Fix issue 280: Facebook without a dive selected
Accessing Facebook stuff without a dive selected (as in an empty logbook) just SIGSEGVs. Just be more carefull. After this fix, it is still possible to upload an "empty dive" to FB. Ok, a little pointless, but a nice picture of the Subsurface logo is uploaded to FB. Consider it an easter egg :-) Fixes: #280 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
bd0c99dfb7
commit
588a83e339
1 changed files with 4 additions and 0 deletions
|
@ -296,6 +296,10 @@ void SocialNetworkDialog::selectionChanged()
|
|||
{
|
||||
struct dive *d = current_dive;
|
||||
QString fullText;
|
||||
|
||||
if (!d)
|
||||
return;
|
||||
|
||||
if (ui->date->isChecked()) {
|
||||
fullText += tr("Dive date: %1 \n").arg(get_short_dive_date_string(d->when));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue