Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes segfaults in freecad
- Loading branch information
Showing
2 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- Coin-3.1.3/src/misc/SbHash.h.init 2010-03-02 22:20:09.000000000 +0900 | ||
+++ Coin-3.1.3/src/misc/SbHash.h 2016-04-22 16:52:39.888883757 +0900 | ||
@@ -89,6 +89,8 @@ | ||
cc_memalloc_deallocate(entry->memhandler, ptr); | ||
} | ||
SbHashEntry(const Key & key, const Type & obj) : key(key), obj(obj) {} | ||
+ SbHashEntry(const Key & key, const Type & obj, cc_memalloc *memhandler) | ||
+ : key(key), obj(obj), memhandler(memhandler) {} | ||
|
||
Key key; | ||
Type obj; | ||
@@ -218,7 +220,7 @@ | ||
/* Key not already in the hash table; insert a new | ||
* entry as the first element in the bucket | ||
*/ | ||
- entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj); | ||
+ entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj, this->memhandler); | ||
entry->next = this->buckets[i]; | ||
this->buckets[i] = entry; |