Fixed a snapshot crash

This commit is contained in:
Shyotl
2011-03-14 16:26:47 -05:00
parent 564f7067f7
commit 343bb22b5c

View File

@@ -588,7 +588,6 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
gViewerWindow->playSnapshotAnimAndSound();
LLPointer<LLImageFormatted> formatted;
formatted->enableOverSize();
switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
{
case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
@@ -605,6 +604,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
return true;
}
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize();
gViewerWindow->saveImageNumbered(formatted);