aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Gottfried <sebastiangottfried@web.de>2016-10-10 09:57:55 (GMT)
committerSebastian Gottfried <sebastiangottfried@web.de>2016-10-10 09:57:55 (GMT)
commit1ce4b332dfb361c90cb41b6376c8ec6b019d895f (patch)
treef84da42cf81595e44a107d69eb8ae799a612d2f6
parent2bed2ed84cd038973c6b894bbf33e2bf40849223 (diff)
Fix Crash Due Parentless QObjects
Some one else (the QML engine?) deleted the profile items before us resulting in a nasty segfault.
-rw-r--r--src/core/profiledataaccess.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/profiledataaccess.cpp b/src/core/profiledataaccess.cpp
index e8088f1..25365a4 100644
--- a/src/core/profiledataaccess.cpp
+++ b/src/core/profiledataaccess.cpp
@@ -59,7 +59,7 @@ void ProfileDataAccess::loadProfiles()
while(profileQuery.next())
{
- Profile* profile = new Profile();
+ Profile* profile = new Profile(this);
profile->setId(profileQuery.value(0).toInt());
profile->setName(profileQuery.value(1).toString());
int rawSkillLevel = profileQuery.value(2).toInt();