mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Prevent possible SIGSEGV in test
If the load fails the get_dive(1) could return NULL. Let's catch that as an error instead of having the test crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cc0f298980
commit
aef6364921
1 changed files with 1 additions and 0 deletions
|
@ -233,6 +233,7 @@ void TestGitStorage::testGitStorageCloudMerge2()
|
|||
QCOMPARE(parse_file(qPrintable(cloudTestRepo)), 0);
|
||||
process_dives(false, false);
|
||||
dive = get_dive(1);
|
||||
QVERIFY(dive != NULL);
|
||||
free(dive->notes);
|
||||
dive->notes = strdup("These notes have been modified by TestGitStorage");
|
||||
QCOMPARE(save_dives(qPrintable(cloudTestRepo)), 0);
|
||||
|
|
Loading…
Reference in a new issue