-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General check for null pointer in saveGraph #503
Conversation
if(formatting.connectKeysToFactor && factor) { | ||
for(Key key: *factor) { | ||
stm << " var" << key << "--" << "factor" << i << ";\n"; | ||
if (formatting.connectKeysToFactor && factor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just formatting.
} | ||
} | ||
} | ||
} | ||
else { | ||
if(factor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this check since I added a generic check at the beginning.
if(pos != formatting.factorPositions.end()) | ||
stm << ", pos=\"" << formatting.scale*(pos->second.x() - minX) << "," | ||
<< formatting.scale*(pos->second.y() - minY) << "!\""; | ||
map<size_t, Point2>::const_iterator pos = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting changes.
const KeyVector& keys = factor->keys(); | ||
if (formatting.binaryEdges && keys.size()==2) { | ||
stm << " var" << keys[0] << "--" << "var" << keys[1] << ";\n"; | ||
if (formatting.binaryEdges && keys.size() == 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting changes
if (!factor) { | ||
continue; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is the main fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-)
Thanks for fixing that, and sorry for not doing it myself. I was on holidays the last two weeks. |
Sure! I hope you had a nice holiday! |
Sure thing! Thanks for bringing up this issue and hope you had a nice holiday. |
Fix for #467