HamedMasafi / Nut

Advanced, Powerful and easy to use ORM for Qt
GNU Lesser General Public License v3.0
294 stars 75 forks source link

Fix possible refering to unallocated memory by using QSharedPointer #66

Closed martonmiklos closed 4 years ago

martonmiklos commented 4 years ago

Hi @HamedMasafi With a bit more complex (tables with several foreign keys) model I got segfaults because the lastRow pointed to a data of a shared pointer which got deallocated in the previous loop. Using a shared pointer on the lastRow field solves this issue.