Browse Source

Fixed Image::filename issue

v1.x
Tj Holowaychuk 14 years ago
parent
commit
899a7a28e7
  1. 4
      src/Image.cc

4
src/Image.cc

@ -7,6 +7,7 @@
#include "Canvas.h"
#include "Image.h"
#include <string.h>
/*
* Initialize Image.
@ -90,7 +91,7 @@ Image::SetSrc(Local<String>, Local<Value> val, const AccessorInfo &info) {
if (val->IsString()) {
String::AsciiValue src(val);
Image *img = ObjectWrap::Unwrap<Image>(info.This());
img->filename = *src;
img->filename = strdup(*src);
img->load();
}
}
@ -155,6 +156,7 @@ Image::Image() {
Image::~Image() {
if (_surface) cairo_surface_destroy(_surface);
if (filename) free(filename);
}
/*

Loading…
Cancel
Save