diff options
| author | Mike Wey | 2011-01-30 20:47:20 +0100 |
|---|---|---|
| committer | Mike Wey | 2011-01-30 20:47:20 +0100 |
| commit | 8f8144c50993c4043d5b08ab9881e017e392d064 (patch) | |
| tree | c0b96fbf643b5fd024ae58bfeb958147579e7174 /dmagick/Utils.d | |
| parent | 7e793c9571f88ba422850e780e7cafff2cd3f1b2 (diff) | |
Add the pattern porperties to Options and a few bug fixes
Diffstat (limited to 'dmagick/Utils.d')
| -rw-r--r-- | dmagick/Utils.d | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dmagick/Utils.d b/dmagick/Utils.d index e8cef21..1396ddf 100644 --- a/dmagick/Utils.d +++ b/dmagick/Utils.d @@ -18,7 +18,7 @@ import dmagick.c.magickType; * Copy a string into a static array used * by ImageMagick for some atributes. */ -private void copyString(ref char[MaxTextExtent] dest, string source) +void copyString(ref char[MaxTextExtent] dest, string source) { if ( source.length < MaxTextExtent ) throw new Exception("text is to long"); //TODO: a proper exception. @@ -34,7 +34,7 @@ private void copyString(ref char[MaxTextExtent] dest, string source) * append a \0 to the end of the string, and the realocation * whould be wastefull if we are just going to copy it */ -private void copyString(ref char* dest, string source) +void copyString(ref char* dest, string source) { if ( source is null ) { @@ -93,6 +93,9 @@ struct RefCounted(alias pred, T) ~this() { + if ( !isInitialized ) + return; + (*refcount)--; if ( *refcount == 0 ) |
