diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-09-14 00:53:47 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-09-14 00:53:47 +0000 |
| commit | 802aa9203e72f6dd84e3508efd2f3cb231c1d615 (patch) | |
| tree | bc97aeaf64935456ef6196219efb7c9503c418b2 /src/document.cpp | |
| parent | change email (diff) | |
| download | inkscape-802aa9203e72f6dd84e3508efd2f3cb231c1d615.tar.gz inkscape-802aa9203e72f6dd84e3508efd2f3cb231c1d615.zip | |
two safe changes: 1) increase the arbitrary limit on the number of update iterations - it is very possible in a complex document to have more than 32 chained gradients or patterns, and each step requires an iteration; 2) fix crash when this limit is reached for a clipboard document that has no URI
(bzr r8584)
Diffstat (limited to '')
| -rw-r--r-- | src/document.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/document.cpp b/src/document.cpp index 288e52c6d..8503c7841 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -900,16 +900,16 @@ SPDocument::_updateDocument() * Repeatedly works on getting the document updated, since sometimes * it takes more than one pass to get the document updated. But it * usually should not take more than a few loops, and certainly never - * more than 32 iterations. So we bail out if we hit 32 iterations, + * more than 64 iterations. So we bail out if we hit 64 iterations, * since this typically indicates we're stuck in an update loop. */ gint sp_document_ensure_up_to_date(SPDocument *doc) { - int counter = 32; + int counter = 64; while (!doc->_updateDocument()) { if (counter == 0) { - g_warning("More than 32 iteration while updating document '%s'", doc->uri); + g_warning("More than 64 iteration while updating document '%s'", doc->uri? doc->uri:"<unknown URI, probably clipboard>"); break; } counter--; |
